Interface IConsumeFilter
An abstraction for a filter that is applied to every incoming message before it reaches the handler. Implementations can enforce policies like Idempotency (Inbox pattern), validation, etc.
Namespace: Chapar.Core.Abstractions
Assembly: Chapar.Core.dll
Syntax
public interface IConsumeFilter
Methods
| Edit this page View SourceMarkAsProcessedAsync(string, string)
Marks a message as successfully processed to prevent duplicate processing.
Declaration
Task MarkAsProcessedAsync(string messageId, string consumerTypeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | messageId | The unique identifier of the message. |
| string | consumerTypeName | The fully qualified type name of the consumer. |
Returns
| Type | Description |
|---|---|
| Task |
ShouldProcessAsync(string, string)
Determines whether a message with the given ID should be processed.
Declaration
Task<bool> ShouldProcessAsync(string messageId, string consumerTypeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | messageId | The unique identifier of the incoming message. |
| string | consumerTypeName | The fully qualified type name of the consumer. |
Returns
| Type | Description |
|---|---|
| Task<bool> |
|