Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Amqp Message Update - API Change #17464
Amqp Message Update - API Change #17464
Changes from 16 commits
b234383
c4c6b25
01aeb75
66b1fb1
888217b
ae8f8f2
2918312
fbf1efe
e4525a5
ab9a71c
efdc611
bb72b21
9eb5273
5513888
4839f2f
0886d24
c64ca01
0292180
235a6a4
3140431
2d71f31
79c5438
627f57f
6c9667a
c72a301
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: upper-case 'C'
nit: 'supports', not 'support'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you copying the byte[] here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually removed copy constructor from
AmqpAnnotatedMessage
, since this was created for service bus needs. dotnet also do not have copy constructor.And moved this logic into ServiceBusMessage, I still do Arrays.copyOf because when use is copying a ServiceBusReceivedMessage into ServiceBusMessage , changing one bytes should not effect bytes in other object. Thus I need to use
Arrays.copyOf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should clarify the behavior with @JoshLove-msft to ensure we are not doing needless copies. Specifically, where, if anywhere, does .NET copy in their amqp or service bus library. I would guess it is less than we do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not copy the bytes - we just create a new instance of AmqpMessageBody wrapping the same bytes - https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusMessage.cs#L66-L72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I will remove this copy from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting that we don't make a copy in .NET.
This file was deleted.
This file was deleted.