Search Results for

    Show / Hide Table of Contents

    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 Source

    MarkAsProcessedAsync(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
    | Edit this page View Source

    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>

    true if the message is new and should be processed; otherwise, false.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2026