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