Interface IRabbitMqCloudEventAdapter
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
propertiesIBasicPropertiesThe RabbitMQ basic properties.
bodyReadOnlyMemory<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
propertiesIBasicPropertiesThe RabbitMQ basic properties.
bodyReadOnlyMemory<byte>The message body.
cancellationTokenCancellationTokenCancellation token.
Returns
- ValueTask<CloudEventMode?>
The detected mode when available; otherwise
null.