Interface IConsumerEndpoint
Represents a message broker endpoint to consume from (such as a Kafka topic or RabbitMQ queue or exchange).
Inherited Members
Namespace: Silverback.Messaging
Assembly: Silverback.Integration.dll
Syntax
public interface IConsumerEndpoint : IEndpoint
Properties
| Improve this doc View sourceBatch
Gets the batch settings. Can be used to enable and setup batch processing.
Declaration
BatchSettings? Batch { get; }
Property Value
Type | Description |
---|---|
BatchSettings |
ErrorPolicy
Gets the error policy to be applied when an exception occurs during the processing of the consumed messages.
Declaration
IErrorPolicy ErrorPolicy { get; }
Property Value
Type | Description |
---|---|
IErrorPolicy |
ExactlyOnceStrategy
Gets the strategy to be used to guarantee that each message is consumed only once.
Declaration
IExactlyOnceStrategy? ExactlyOnceStrategy { get; }
Property Value
Type | Description |
---|---|
IExactlyOnceStrategy |
NullMessageHandlingStrategy
Gets a value indicating how to handle the null messages. The default value is Tombstone.
Declaration
NullMessageHandlingStrategy NullMessageHandlingStrategy { get; }
Property Value
Type | Description |
---|---|
NullMessageHandlingStrategy |
Sequence
Gets the sequence settings. A sequence is a set of related messages, like the chunks belonging to the same message or the messages in a dataset.
Declaration
SequenceSettings Sequence { get; }
Property Value
Type | Description |
---|---|
SequenceSettings |
ThrowIfUnhandled
Gets a value indicating whether an exception must be thrown if no subscriber is handling the
received message. The default is true
.
Declaration
bool ThrowIfUnhandled { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Improve this doc View sourceGetUniqueConsumerGroupName()
Gets a unique name for the consumer group (e.g. Kafka's consumer group id). This value (joint with the endpoint name) will be used for example to ensure the exactly-once delivery.
Declaration
string GetUniqueConsumerGroupName()
Returns
Type | Description |
---|---|
string | Returns the unique name for the consumer group. |
Remarks
It's not enough to use the endpoint name, since the same topic could be consumed by multiple consumer groups within the same process and/or using the same database to store the information needed to ensure the exactly-once delivery.