Interface IOutboundEnvelope
- Namespace
- Silverback.Messaging.Messages
- Assembly
- Silverback.Integration.dll
Wraps the message that is being produced to an outbound endpoint.
public interface IOutboundEnvelope : IBrokerEnvelope, IRawBrokerEnvelope, IEnvelope
- Inherited Members
Properties
BrokerMessageIdentifier
Gets the message identifier on the message broker (the Kafka offset or similar).
IBrokerMessageIdentifier? BrokerMessageIdentifier { get; }
Property Value
Remarks
The identifier value will be set only after the message has been successfully published to the message broker.
Context
Gets the current ISilverbackContext.
ISilverbackContext? Context { get; }
Property Value
EndpointConfiguration
Gets the destination endpoint configuration.
ProducerEndpointConfiguration EndpointConfiguration { get; }
Property Value
Producer
Gets the IProducer that will be or was used to produce this message.
IProducer Producer { get; }
Property Value
Methods
AddHeader(string, object)
Adds a new header.
IOutboundEnvelope AddHeader(string name, object value)
Parameters
Returns
- IOutboundEnvelope
The IOutboundEnvelope so that additional calls can be chained.
AddHeaderIfNotExists(string, object?)
Adds a new header if no header with the same name is already set.
IOutboundEnvelope AddHeaderIfNotExists(string name, object? newValue)
Parameters
Returns
- IOutboundEnvelope
The IOutboundEnvelope so that additional calls can be chained.
AddOrReplaceHeader(string, object?)
Adds a new header or replaces the header with the same name.
IOutboundEnvelope AddOrReplaceHeader(string name, object? newValue)
Parameters
Returns
- IOutboundEnvelope
The IOutboundEnvelope so that additional calls can be chained.
CloneReplacingMessage<TNewMessage>(TNewMessage)
Clones the envelope and replaces the contained message with the specified one.
IOutboundEnvelope<TNewMessage> CloneReplacingMessage<TNewMessage>(TNewMessage newMessage) where TNewMessage : class
Parameters
newMessageTNewMessageThe new message to be set.
Returns
- IOutboundEnvelope<TNewMessage>
The new envelope.
Type Parameters
TNewMessageThe type of the new message.
Remarks
The raw message will be cleared.
CloneReplacingRawMessage(Stream?)
Clones the envelope and replaces the raw message with the specified one.
IOutboundEnvelope CloneReplacingRawMessage(Stream? newRawMessage)
Parameters
newRawMessageStreamThe new raw message to be set.
Returns
- IOutboundEnvelope
The new envelope.
GetEndpoint()
Gets the destination endpoint for the specific message.
ProducerEndpoint GetEndpoint()
Returns
- ProducerEndpoint
The endpoint.