-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Host.RabbitMQ] Automatic or manual message acks #21
Signed-off-by: Tomasz Maruszak <[email protected]>
- Loading branch information
Showing
36 changed files
with
454 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
...limMessageBus.Host.RabbitMQ/Behaviors/RabbitMqConsumerContextExtensionsForErrorHandler.cs
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/SlimMessageBus.Host.RabbitMQ/Behaviors/RabbitMqMessageConfirmOption.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/SlimMessageBus.Host.RabbitMQ/Config/RabbitMqMessageAcknowledgementMode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace SlimMessageBus.Host.RabbitMQ; | ||
|
||
/// <summary> | ||
/// Specifies how messages are confirmed with RabbitMq | ||
/// </summary> | ||
public enum RabbitMqMessageAcknowledgementMode | ||
{ | ||
/// <summary> | ||
/// Each message will get an Ack after successful processing, or when error happens the message will get an Nack in the end. | ||
/// However, if the user made any manual ConsumerContext.Ack() or ConsumerContext.Nack() during the consumption process (or in an interceptor), that will be used to confirm the message instead. | ||
/// This results in at-least-once delivery guarantee and a safe processing. | ||
/// </summary> | ||
/// <remarks>That is the default option</remarks> | ||
ConfirmAfterMessageProcessingWhenNoManualConfirmMade = 0, | ||
|
||
/// <summary> | ||
/// The message will already be considered as Ack upon recieve. See https://www.rabbitmq.com/docs/confirms#acknowledgement-modes for details. | ||
/// This results in at-most-once delivery guarantee (messages could be lost if processing would not fully finish). | ||
/// This is managed by the protocol and should give faster throughput than <see cref="RabbitMqMessageAcknowledgementMode.AckMessageBeforeProcessing"/> while leading to same delivery guarantees. | ||
/// </summary> | ||
AckAutomaticByRabbit = 1, | ||
|
||
/// <summary> | ||
/// The message will be Ack-ed by SMB before the actuall message processing starts. | ||
/// This results in at-most-once delivery guarantee (messages could be lost if processing would not fully finish). | ||
/// </summary> | ||
AckMessageBeforeProcessing = 2, | ||
} |
Oops, something went wrong.