Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend EventData with AmqpAnnotatedMessage #21717

Closed
conniey opened this issue May 21, 2021 · 0 comments
Closed

Extend EventData with AmqpAnnotatedMessage #21717

conniey opened this issue May 21, 2021 · 0 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Milestone

Comments

@conniey
Copy link
Member

conniey commented May 21, 2021

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 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:

    • Subject (message property)
    • To (message property)
    • ReplyTo (message property)
    • TimeToLive (message header)
    • TransactionPartitionKey (message annotation)
    • ScheduledEnqueueTime (message annotation)
    • SessionId (message property GroupId)
    • ReplyToSessionId (message property ReplyToGroupId)

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

Copied summary from: Azure/azure-sdk-for-net#20105

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 21, 2021
@conniey conniey added Client This issue points to a problem in the data-plane of the library. Event Hubs labels May 21, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 21, 2021
@conniey conniey added this to the [2021] June milestone May 21, 2021
@conniey conniey closed this as completed Jul 27, 2021
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-java that referenced this issue Dec 6, 2022
[Hub Generated] Publish private branch 'user/pri/2022-12-01' (Azure#21717)

* add or modify files

* Fixed spellcheck validation err

* Fixed avocado validation err

* Fixed avocado validation err

* Fixed avocado validation err

* Fixed avocado validation err

* Fixed avocado validation err

* Fixed avocado validation err

* Fixed avocado validation err

* Fixed avocado validation err

* avacado fix

* avacado fix

* avacado fix

* avacado fix'

* avacado fix

* avacado fix

* revert custom-words.txt

* update custom-words.txt

* updated PreCheckResult

* removed SystemData

* removed SystemData

Co-authored-by: Aditya Ravishankar <ravishankara@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

No branches or pull requests

2 participants