Table of Contents

Class KafkaGroupIdFilterAttribute

Namespace
Silverback.Messaging.Subscribers
Assembly
Silverback.Integration.Kafka.dll

Can be placed on a subscribed method to filter the messages to be processed according to the group id that consumed them. This is used when having multiple consumer groups for the same topic running in the same process.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
public sealed class KafkaGroupIdFilterAttribute : MessageFilterAttribute, IMessageFilter
Inheritance
KafkaGroupIdFilterAttribute
Implements
Inherited Members

Constructors

KafkaGroupIdFilterAttribute(params string[])

Initializes a new instance of the KafkaGroupIdFilterAttribute class.

public KafkaGroupIdFilterAttribute(params string[] groupId)

Parameters

groupId string[]

The list of group id whose messages have to be processed.

Properties

GroupId

Gets the list of group id whose messages have to be processed.

public string[] GroupId { get; }

Property Value

string[]

Methods

MustProcess(object)

Returns a boolean value indicating whether the specified message must be processed by the subscribed method decorated with this attribute.

public override bool MustProcess(object message)

Parameters

message object

The message to be checked.

Returns

bool

A boolean value indicating whether the message must be processed by the subscribed method.