Class InboundEnvelopeBuilderExtensions
Adds the WithOffset methods to the InboundEnvelopeBuilder<TMessage>.
Inherited Members
Namespace: Silverback.Messaging.Messages
Assembly: Silverback.Integration.Kafka.Testing.dll
Syntax
public static class InboundEnvelopeBuilderExtensions
Methods
WithKafkaKey<TMessage>(InboundEnvelopeBuilder<TMessage>, string)
Sets the key of the message consumed from Kafka.
Declaration
public static InboundEnvelopeBuilder<TMessage> WithKafkaKey<TMessage>(this InboundEnvelopeBuilder<TMessage> builder, string key) where TMessage : class
Parameters
| Type | Name | Description |
|---|---|---|
| InboundEnvelopeBuilder<TMessage> | builder | |
| string | key | The Kafka message key. |
Returns
| Type | Description |
|---|---|
| InboundEnvelopeBuilder<TMessage> | The InboundEnvelopeBuilder<TMessage> so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TMessage | The type of the message. |
WithKafkaTimestamp<TMessage>(InboundEnvelopeBuilder<TMessage>, DateTime)
Sets the timestamp of the message consumed from Kafka.
Declaration
public static InboundEnvelopeBuilder<TMessage> WithKafkaTimestamp<TMessage>(this InboundEnvelopeBuilder<TMessage> builder, DateTime timestamp) where TMessage : class
Parameters
| Type | Name | Description |
|---|---|---|
| InboundEnvelopeBuilder<TMessage> | builder | |
| DateTime | timestamp | The timestamp of the message. |
Returns
| Type | Description |
|---|---|
| InboundEnvelopeBuilder<TMessage> | The InboundEnvelopeBuilder<TMessage> so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TMessage | The type of the message. |
WithOffset<TMessage>(InboundEnvelopeBuilder<TMessage>, KafkaOffset)
Sets the offset of the message.
Declaration
public static InboundEnvelopeBuilder<TMessage> WithOffset<TMessage>(this InboundEnvelopeBuilder<TMessage> builder, KafkaOffset offset) where TMessage : class
Parameters
| Type | Name | Description |
|---|---|---|
| InboundEnvelopeBuilder<TMessage> | builder | |
| KafkaOffset | offset | The offset. |
Returns
| Type | Description |
|---|---|
| InboundEnvelopeBuilder<TMessage> | The InboundEnvelopeBuilder<TMessage> so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TMessage | The type of the message. |
WithOffset<TMessage>(InboundEnvelopeBuilder<TMessage>, string, int, long)
Sets the offset of the message.
Declaration
public static InboundEnvelopeBuilder<TMessage> WithOffset<TMessage>(this InboundEnvelopeBuilder<TMessage> builder, string topic, int partition, long offset) where TMessage : class
Parameters
| Type | Name | Description |
|---|---|---|
| InboundEnvelopeBuilder<TMessage> | builder | |
| string | topic | The topic. |
| int | partition | The partition. |
| long | offset | The offset. |
Returns
| Type | Description |
|---|---|
| InboundEnvelopeBuilder<TMessage> | The InboundEnvelopeBuilder<TMessage> so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TMessage | The type of the message. |