Table of Contents

Interface ICloudEventEncoder<TOutbound>

Namespace
Excalibur.Dispatch.Transport
Assembly
Excalibur.Dispatch.Transport.Abstractions.dll

Maps a CloudEvent into a provider-specific outbound transport message.

public interface ICloudEventEncoder<TOutbound>

Type Parameters

TOutbound

The transport message type produced for send.

Extension Methods

Remarks

Split from the former ICloudEventMapper<T>: every transport that supports CloudEvents can encode, but not every transport's send type is meaningfully decodable -- four of the original eight mappers are typed on send-only provider SDK types (SendMessageRequest, PublishRequest, PutEventsRequestEntry, ServiceBusMessage) that never appear as an inbound object. Decoding is a separate concern; see Excalibur.Dispatch.Transport.ICloudEventDecoder<TInbound>.

Properties

Options

Gets the options used to configure CloudEvent serialization.

CloudEventOptions Options { get; }

Property Value

CloudEventOptions

The options used to configure CloudEvent serialization.

Methods

ToTransportMessageAsync(CloudEvent, CloudEventMode, CancellationToken)

Converts a CloudEvent instance into a provider-specific transport message.

Task<TOutbound> ToTransportMessageAsync(CloudEvent cloudEvent, CloudEventMode mode, CancellationToken cancellationToken)

Parameters

cloudEvent CloudEvent

The CloudEvent to convert.

mode CloudEventMode

The serialization mode to apply.

cancellationToken CancellationToken

Cancellation token for the async operation.

Returns

Task<TOutbound>

The serialized transport message.