Table of Contents

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

message object

The message to be wrapped in the envelope.

originalEnvelope IOutboundEnvelope

The 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

message object

The message to be wrapped in the envelope.

headers IReadOnlyCollection<MessageHeader>

The message headers.

endpointConfiguration ProducerEndpointConfiguration

The destination endpoint configuration.

producer IProducer

The producer to be used to produce this message.

context ISilverbackContext

The ISilverbackContext.

Returns

IOutboundEnvelope

The IOutboundEnvelope instance.