You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EventData type currently exposes only a curated set of the information available for messages using the AMQP protocol. While this results in a simpler and more easily understood API surface for an event, it does limit interoperability with other message brokers, including Azure Service Bus.
The Service Bus message types have been enhanced to surface important protocol information, such as content type, using primary properties and to offer access to the full underlying AMQP message using the getRawAmqpMesage() method. The Event Hubs EventData type should be extended for parity with the Service Bus messages to support data flowing between Event Hubs and Service Bus as well as advanced scenarios where interoperability with other message brokers is needed.
Scope of Work
Extend the EventData type to make use of the AmqpAnnotatedMessage in azure-core-amqp type as a backing store for the data associated with an event. Changes to the EventData should be immediately available in the underlying AmqpAnnotatedMessage and vice-versa where the AMQP data is surfaced through EventData.
Extend the EventData type with the following properties, considering the ServiceBusMessage as prior art:
ContentType (string)
MessageId (string)
CorrelationId (string)
Extend EventData with a method called getRawAmqpMessage() which allows access to the underlying AmqpAnnotatedMessage backing the EventData instance, following the API pattern approved for use in the ServiceBusMessage type.
Update the MessageSerializer to operate on the AmqpAnnotatedMessage rather than directly against the EventData instance.
Out of Scope
Primary property support for message data unlikely to be relevant in the Event Hubs context:
Summary
The
EventData
type currently exposes only a curated set of the information available for messages using the AMQP protocol. While this results in a simpler and more easily understood API surface for an event, it does limit interoperability with other message brokers, including Azure Service Bus.The Service Bus message types have been enhanced to surface important protocol information, such as content type, using primary properties and to offer access to the full underlying AMQP message using the
getRawAmqpMesage()
method. The Event HubsEventData
type should be extended for parity with the Service Bus messages to support data flowing between Event Hubs and Service Bus as well as advanced scenarios where interoperability with other message brokers is needed.Scope of Work
Extend the
EventData
type to make use of theAmqpAnnotatedMessage
in azure-core-amqp type as a backing store for the data associated with an event. Changes to theEventData
should be immediately available in the underlyingAmqpAnnotatedMessage
and vice-versa where the AMQP data is surfaced throughEventData
.Extend the
EventData
type with the following properties, considering theServiceBusMessage
as prior art:ContentType
(string)MessageId
(string)CorrelationId
(string)Extend
EventData
with a method calledgetRawAmqpMessage()
which allows access to the underlyingAmqpAnnotatedMessage
backing theEventData
instance, following the API pattern approved for use in theServiceBusMessage
type.Update the
MessageSerializer
to operate on theAmqpAnnotatedMessage
rather than directly against theEventData
instance.Out of Scope
Primary property support for message data unlikely to be relevant in the Event Hubs context:
Subject
(message property)To
(message property)ReplyTo
(message property)TimeToLive
(message header)TransactionPartitionKey
(message annotation)ScheduledEnqueueTime
(message annotation)SessionId
(message propertyGroupId
)ReplyToSessionId
(message propertyReplyToGroupId
)Success Criteria
The
EventData
surface has been enhanced as detailed in the scope.Event Hubs service operations are made using the full set of data from the
AmqpAnnotatedMessage
.The tests necessary for ensuring the feature works as intended have been created or adjusted and pass reliably.
Existing tests continue to produce deterministic results and pass reliably.
References and Related
ServiceBusMessage
Serializer
Copied summary from: Azure/azure-sdk-for-net#20105
The text was updated successfully, but these errors were encountered: