Table of Contents

Interface IRabbitMqCloudEventAdapter

Namespace
Excalibur.Dispatch.Transport.RabbitMQ
Assembly
Excalibur.Dispatch.Transport.RabbitMQ.dll

RabbitMQ adapter for CloudEvents supporting both structured and binary modes.

public interface IRabbitMqCloudEventAdapter : ICloudEventEncoder<(IBasicProperties properties, ReadOnlyMemory<byte> body)>
Inherited Members
Extension Methods

Remarks

Implements CloudEvents specification for RabbitMQ with DoD-compliant envelope property preservation. Supports structured mode (JSON payload) and binary mode (message headers).

Methods

IsValidCloudEventMessage(IBasicProperties, ReadOnlyMemory<byte>)

Validates that RabbitMQ message properties and body contain valid CloudEvent data.

bool IsValidCloudEventMessage(IBasicProperties properties, ReadOnlyMemory<byte> body)

Parameters

properties IBasicProperties

The RabbitMQ basic properties.

body ReadOnlyMemory<byte>

The message body.

Returns

bool

True if the message contains valid CloudEvent data.

TryDetectMode(IBasicProperties, ReadOnlyMemory<byte>, CancellationToken)

Attempts to detect the CloudEvent mode used by the supplied RabbitMQ message tuple.

ValueTask<CloudEventMode?> TryDetectMode(IBasicProperties properties, ReadOnlyMemory<byte> body, CancellationToken cancellationToken)

Parameters

properties IBasicProperties

The RabbitMQ basic properties.

body ReadOnlyMemory<byte>

The message body.

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask<CloudEventMode?>

The detected mode when available; otherwise null .