Table of Contents

Interface IIntegrationPublisher

Namespace
Silverback.Messaging.Publishing
Assembly
Silverback.Integration.dll

Exposes the methods to enrich and publish the messages to the configured message broker endpoints.

public interface IIntegrationPublisher

Remarks

The exceptions documented on IProducer (e.g. ProduceException and MessageValidationException) propagate as well.

Methods

WrapAndPublishAsync<TMessage>(TMessage?, Action<IOutboundEnvelope<TMessage>>?, CancellationToken)

Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.

Task WrapAndPublishAsync<TMessage>(TMessage? message, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

message TMessage

The message to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>>

An optional action that can be used to configure the envelope.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the message to be published.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishAsync<TMessage>(TMessage?, CancellationToken)

Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.

Task WrapAndPublishAsync<TMessage>(TMessage? message, CancellationToken cancellationToken = default) where TMessage : class

Parameters

message TMessage

The message to be published.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the message to be published.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishAsync<TMessage, TArgument>(TMessage?, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument, CancellationToken)

Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.

Task WrapAndPublishAsync<TMessage, TArgument>(TMessage? message, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class

Parameters

message TMessage

The message to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the envelopeConfigurationAction.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the message to be published.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatchAsync<TMessage>(IAsyncEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>>?, CancellationToken)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TMessage>(IAsyncEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

messages IAsyncEnumerable<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>>

An optional action that can be used to configure the envelopes.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the messages to be published.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TMessage>(IAsyncEnumerable<TMessage?>, CancellationToken)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TMessage>(IAsyncEnumerable<TMessage?> messages, CancellationToken cancellationToken = default) where TMessage : class

Parameters

messages IAsyncEnumerable<TMessage>

The messages to be published.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the messages to be published.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TMessage>(IEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>>?, CancellationToken)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TMessage>(IEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

messages IEnumerable<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>>

An optional action that can be used to configure the envelopes.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the messages to be published.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TMessage>(IEnumerable<TMessage?>, CancellationToken)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TMessage>(IEnumerable<TMessage?> messages, CancellationToken cancellationToken = default) where TMessage : class

Parameters

messages IEnumerable<TMessage>

The messages to be published.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the messages to be published.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TMessage>(IReadOnlyCollection<TMessage?>, Action<IOutboundEnvelope<TMessage>>?, CancellationToken)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TMessage>(IReadOnlyCollection<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

messages IReadOnlyCollection<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>>

An optional action that can be used to configure the envelopes.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the messages to be published.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatchAsync<TMessage>(IReadOnlyCollection<TMessage?>, CancellationToken)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TMessage>(IReadOnlyCollection<TMessage?> messages, CancellationToken cancellationToken = default) where TMessage : class

Parameters

messages IReadOnlyCollection<TMessage>

The messages to be published.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the messages to be published.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatchAsync<TMessage, TArgument>(IAsyncEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument, CancellationToken)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TMessage, TArgument>(IAsyncEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class

Parameters

messages IAsyncEnumerable<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the envelopeConfigurationAction.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the messages to be published.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TSource, TMessage>(IAsyncEnumerable<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?, CancellationToken)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TSource, TMessage>(IAsyncEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

sources IAsyncEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource>

An optional action that can be used to configure the envelopes.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TSource, TMessage>(IAsyncEnumerable<TSource>, Func<TSource, TMessage?>, CancellationToken)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TSource, TMessage>(IAsyncEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

sources IAsyncEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TMessage>

The function used to map the source objects to messages.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TMessage, TArgument>(IEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument, CancellationToken)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TMessage, TArgument>(IEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class

Parameters

messages IEnumerable<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the envelopeConfigurationAction.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the messages to be published.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TSource, TMessage>(IEnumerable<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?, CancellationToken)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TSource, TMessage>(IEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

sources IEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource>

An optional action that can be used to configure the envelopes.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TSource, TMessage>(IEnumerable<TSource>, Func<TSource, TMessage?>, CancellationToken)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TSource, TMessage>(IEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

sources IEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TMessage>

The function used to map the source objects to messages.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TMessage, TArgument>(IReadOnlyCollection<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument, CancellationToken)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TMessage, TArgument>(IReadOnlyCollection<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class

Parameters

messages IReadOnlyCollection<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the envelopeConfigurationAction.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TMessage

The type of the messages to be published.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatchAsync<TSource, TMessage>(IReadOnlyCollection<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?, CancellationToken)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TSource, TMessage>(IReadOnlyCollection<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

sources IReadOnlyCollection<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource>

An optional action that can be used to configure the envelopes.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatchAsync<TSource, TMessage>(IReadOnlyCollection<TSource>, Func<TSource, TMessage?>, CancellationToken)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TSource, TMessage>(IReadOnlyCollection<TSource> sources, Func<TSource, TMessage?> mapperFunction, CancellationToken cancellationToken = default) where TMessage : class

Parameters

sources IReadOnlyCollection<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TMessage>

The function used to map the source objects to messages.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(IAsyncEnumerable<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument, CancellationToken)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(IAsyncEnumerable<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class

Parameters

sources IAsyncEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TArgument, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the mapperFunction and the envelopeConfigurationAction.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(IEnumerable<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument, CancellationToken)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(IEnumerable<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class

Parameters

sources IEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TArgument, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the mapperFunction and the envelopeConfigurationAction.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(IReadOnlyCollection<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument, CancellationToken)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

Task WrapAndPublishBatchAsync<TSource, TMessage, TArgument>(IReadOnlyCollection<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument, CancellationToken cancellationToken = default) where TMessage : class

Parameters

sources IReadOnlyCollection<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TArgument, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the mapperFunction and the envelopeConfigurationAction.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

Task

A Task representing the asynchronous operation.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatch<TMessage>(IAsyncEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>>?)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TMessage>(IAsyncEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction = null) where TMessage : class

Parameters

messages IAsyncEnumerable<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>>

An optional action that can be used to configure the envelopes.

Type Parameters

TMessage

The type of the messages to be published.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatch<TMessage>(IEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>>?)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TMessage>(IEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction = null) where TMessage : class

Parameters

messages IEnumerable<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>>

An optional action that can be used to configure the envelopes.

Type Parameters

TMessage

The type of the messages to be published.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatch<TMessage>(IReadOnlyCollection<TMessage?>, Action<IOutboundEnvelope<TMessage>>?)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TMessage>(IReadOnlyCollection<TMessage?> messages, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction = null) where TMessage : class

Parameters

messages IReadOnlyCollection<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>>

An optional action that can be used to configure the envelopes.

Type Parameters

TMessage

The type of the messages to be published.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatch<TMessage, TArgument>(IAsyncEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TMessage, TArgument>(IAsyncEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class

Parameters

messages IAsyncEnumerable<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the envelopeConfigurationAction.

Type Parameters

TMessage

The type of the messages to be published.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatch<TSource, TMessage>(IAsyncEnumerable<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TSource, TMessage>(IAsyncEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction = null) where TMessage : class

Parameters

sources IAsyncEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource>

An optional action that can be used to configure the envelopes.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatch<TMessage, TArgument>(IEnumerable<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TMessage, TArgument>(IEnumerable<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class

Parameters

messages IEnumerable<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the envelopeConfigurationAction.

Type Parameters

TMessage

The type of the messages to be published.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatch<TSource, TMessage>(IEnumerable<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TSource, TMessage>(IEnumerable<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction = null) where TMessage : class

Parameters

sources IEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource>

An optional action that can be used to configure the envelopes.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatch<TMessage, TArgument>(IReadOnlyCollection<TMessage?>, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument)

Wraps the messages in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TMessage, TArgument>(IReadOnlyCollection<TMessage?> messages, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class

Parameters

messages IReadOnlyCollection<TMessage>

The messages to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the envelopeConfigurationAction.

Type Parameters

TMessage

The type of the messages to be published.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatch<TSource, TMessage>(IReadOnlyCollection<TSource>, Func<TSource, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource>?)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TSource, TMessage>(IReadOnlyCollection<TSource> sources, Func<TSource, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource>? envelopeConfigurationAction = null) where TMessage : class

Parameters

sources IReadOnlyCollection<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource>

An optional action that can be used to configure the envelopes.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublishBatch<TSource, TMessage, TArgument>(IAsyncEnumerable<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TSource, TMessage, TArgument>(IAsyncEnumerable<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class

Parameters

sources IAsyncEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TArgument, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the mapperFunction and the envelopeConfigurationAction.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatch<TSource, TMessage, TArgument>(IEnumerable<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TSource, TMessage, TArgument>(IEnumerable<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class

Parameters

sources IEnumerable<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TArgument, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the mapperFunction and the envelopeConfigurationAction.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type, or more than one producer is configured for it (not supported for enumerable batches).

WrapAndPublishBatch<TSource, TMessage, TArgument>(IReadOnlyCollection<TSource>, Func<TSource, TArgument, TMessage?>, Action<IOutboundEnvelope<TMessage>, TSource, TArgument>, TArgument)

Maps the source objects into messages, wraps them in an IOutboundEnvelope<TMessage> and publishes them.

void WrapAndPublishBatch<TSource, TMessage, TArgument>(IReadOnlyCollection<TSource> sources, Func<TSource, TArgument, TMessage?> mapperFunction, Action<IOutboundEnvelope<TMessage>, TSource, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class

Parameters

sources IReadOnlyCollection<TSource>

The source objects to be mapped.

mapperFunction Func<TSource, TArgument, TMessage>

The function used to map the source objects to messages.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TSource, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the mapperFunction and the envelopeConfigurationAction.

Type Parameters

TSource

The type of the source objects.

TMessage

The type of the messages to be produced.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublish<TMessage>(TMessage?, Action<IOutboundEnvelope<TMessage>>?)

Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.

void WrapAndPublish<TMessage>(TMessage? message, Action<IOutboundEnvelope<TMessage>>? envelopeConfigurationAction = null) where TMessage : class

Parameters

message TMessage

The message to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>>

An optional action that can be used to configure the envelope.

Type Parameters

TMessage

The type of the message to be published.

Exceptions

RoutingException

No producer is configured for the message type.

WrapAndPublish<TMessage, TArgument>(TMessage?, Action<IOutboundEnvelope<TMessage>, TArgument>, TArgument)

Wraps the message in an IOutboundEnvelope<TMessage> and publishes it.

void WrapAndPublish<TMessage, TArgument>(TMessage? message, Action<IOutboundEnvelope<TMessage>, TArgument> envelopeConfigurationAction, TArgument argument) where TMessage : class

Parameters

message TMessage

The message to be published.

envelopeConfigurationAction Action<IOutboundEnvelope<TMessage>, TArgument>

The action used to configure the envelopes.

argument TArgument

The argument to be passed to the envelopeConfigurationAction.

Type Parameters

TMessage

The type of the message to be published.

TArgument

The type of the argument passed to the envelopeConfigurationAction.

Exceptions

RoutingException

No producer is configured for the message type.