Class OutboundEnvelopeFactory
- Namespace
- Silverback.Messaging.Producing.Routing
- Assembly
- Silverback.Integration.dll
The factory used to build the IOutboundEnvelope or IOutboundEnvelope<TMessage> instances.
public static class OutboundEnvelopeFactory
- Inheritance
-
OutboundEnvelopeFactory
- Inherited Members
Methods
CreateEnvelope(object?, IOutboundEnvelope)
Creates a new instance of IOutboundEnvelope or IOutboundEnvelope<TMessage> cloning the original envelope and replacing the message.
public static IOutboundEnvelope CreateEnvelope(object? message, IOutboundEnvelope originalEnvelope)
Parameters
messageobjectThe message to be wrapped in the envelope.
originalEnvelopeIOutboundEnvelopeThe original envelope to be cloned.
Returns
- IOutboundEnvelope
The new IOutboundEnvelope instance.
CreateEnvelope(object?, IReadOnlyCollection<MessageHeader>?, ProducerEndpointConfiguration, IProducer, ISilverbackContext?)
Creates a new instance of IOutboundEnvelope or IOutboundEnvelope<TMessage>.
public static IOutboundEnvelope CreateEnvelope(object? message, IReadOnlyCollection<MessageHeader>? headers, ProducerEndpointConfiguration endpointConfiguration, IProducer producer, ISilverbackContext? context = null)
Parameters
messageobjectThe message to be wrapped in the envelope.
headersIReadOnlyCollection<MessageHeader>The message headers.
endpointConfigurationProducerEndpointConfigurationThe destination endpoint configuration.
producerIProducerThe producer to be used to produce this message.
contextISilverbackContextThe ISilverbackContext.
Returns
- IOutboundEnvelope
The IOutboundEnvelope instance.