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

SB Track2: Expose AMQP details ServiceBus Messages for sending and receiving. #14848

Conversation

hemanttanwar
Copy link
Contributor

@hemanttanwar hemanttanwar commented Sep 4, 2020

Expose AMQP details ServiceBus Messages for sending and receiving.

API View : https://apiview.dev/Assemblies/Review/64f40be9988242c9a8facc8a20c5e9e7
fixes #14385

@ghost ghost added Azure.Core azure-core Service Bus labels Sep 4, 2020
@@ -353,7 +392,10 @@ public OffsetDateTime getScheduledEnqueueTime() {
* @see #getScheduledEnqueueTime()
*/
public ServiceBusMessage setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime) {
this.scheduledEnqueueTime = scheduledEnqueueTime;
if (scheduledEnqueueTime != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if they're trying to clear the scheduledEnqueueTime? Isn't null a value option to pass? Same with other instances.

Copy link
Contributor Author

@hemanttanwar hemanttanwar Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally these key,value pair is stored in Map and Null value is not allowed.
The code on master is also checking for null and not putting in map is user provided null value.
User can get Map using amqpAnnotatedMessage.getMessageAnnotations() and remove a key if they do not want it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worthwhile to document here. it's odd having one method do one thing and then the other do something else.

Copy link
Member

@conniey conniey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: LGTM. A couple of comments.

@@ -353,7 +392,10 @@ public OffsetDateTime getScheduledEnqueueTime() {
* @see #getScheduledEnqueueTime()
*/
public ServiceBusMessage setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime) {
this.scheduledEnqueueTime = scheduledEnqueueTime;
if (scheduledEnqueueTime != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worthwhile to document here. it's odd having one method do one thing and then the other do something else.

@hemanttanwar hemanttanwar merged commit 70d16c3 into Azure:master Sep 10, 2020
@hemanttanwar hemanttanwar deleted the sb-track2-expose-amqp-message-details-14385 branch September 10, 2020 02:09
conniey pushed a commit to conniey/azure-sdk-for-java that referenced this pull request Sep 11, 2020
…ceiving. (Azure#14848)

Expose AMQP details ServiceBus Messages for sending and receiving.
conniey added a commit that referenced this pull request Sep 11, 2020
* SB Track2: Expose AMQP details ServiceBus Messages for sending and receiving. (#14848)

Expose AMQP details ServiceBus Messages for sending and receiving.

* Force closes links when connection is closed so it requests another link. (#14990)

* Fixing the string format for Dispatch task.

* Cleaning up print statements.

* Updating text in README.md

* Remove getErrors() which overlaps with getEndpointStates(). Only ouputting one terminal state.

* Clean up tests and use subscribeWith.

* Locally closing on connection error.

* Add changelog entry

* Update versions.

* Update versions for service bus and event hubs

* Update CHANGELOG.md

Update the date on CHANGELOG

Co-authored-by: Hemant Tanwar <hemant_tanwar@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose AMQP details in ServiceBusReceivedMessage.
3 participants