-
Notifications
You must be signed in to change notification settings - Fork 120
Changing Amqp message body type from AmqpValue to AmqpData #184
Conversation
…ody type to Data for the interoperate with old .Net client library
Codecov Report
@@ Coverage Diff @@
## dev #184 +/- ##
==========================================
+ Coverage 55.86% 57.16% +1.29%
==========================================
Files 69 69
Lines 5331 5334 +3
Branches 638 638
==========================================
+ Hits 2978 3049 +71
+ Misses 2053 1987 -66
+ Partials 300 298 -2
Continue to review full report at Codecov.
|
/// </code> | ||
/// </remarks> | ||
public byte[] Body { get; set; } | ||
public ArraySegment<byte> Body { get; set; } |
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.
This feels off. To create a new message with payload, ctor accepts byte[]
.
To assign a body later I need to use ArraySegment<byte>
. Why can't it be byte[]
all the way?
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.
so let's move byte[] ctor? 😃
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.
Yes, this is a breaking change. I am not saying we should do this. 😃 Comments are needed to see what's the right move here. ArraySegment can certainly bring many values and even we don't expose it as Body, internally we will still use ArraySegment as there are optimizations can be done. But public interface could remain as byte[]. We are very close to make this library GA for it's first version and want to get some critical decisions done before it goes 1.0.
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.
so let's move byte[] ctor?
Not sure I follow. Did you mean "remove"?
Yes, this is a breaking change
Well, this is a pre-release 🙂
ArraySegment
- not arguing. Probably internally makes a lot of sense. Externally perhaps should be byte[]
as the first/default option.
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.
K. Thanks for the feedback. Yeah, I will have another discussion with team tomorrow and will update the pull request. But generally this change is mainly to change the message to use Amqp Data as we do some extra processing in both old client and service for AmqpValue and Data will be processed as is which is desired.
Description
Changing Message.Body to ArraySegment and changing the amqp message body type to Data for the interoperate with old .Net client library
This resolves #138
This checklist is used to make sure that common guidelines for a pull request are followed.