Conversation
7428107 to
8db234c
Compare
|
@pierDipi Could you please take a look? |
| final ByteBuffer byteBuffer = message.getBody(); | ||
| byte[] body = new byte[byteBuffer.remaining()]; | ||
| byteBuffer.get(body); |
There was a problem hiding this comment.
Why the buffer "copy"? I can see how this is the safest option, however, what if I don't want any additional buffering and copies?
There was a problem hiding this comment.
Usually the ByteBuffer returned is readonly, so we have to copy it.
|
Thanks @aaron-ai, overall, it looks good and the binding spec seems simple to follow and implement |
|
@pierDipi Thanks for you review! Could you help to re-run the workflow? |
There was a problem hiding this comment.
I have another suggestion, can we use a single package instead of the impl package? I know some components in the SDK are using that approach (I'd like to move away from that), however, that forces us to make some APIs public where they could be package-private.
rocketmq/src/main/java/io/cloudevents/rocketmq/impl/RocketmqConstants.java
Show resolved
Hide resolved
Signed-off-by: Aaron Ai <yangkun.ayk@alibaba-inc.com>
Signed-off-by: Aaron Ai <yangkun.ayk@alibaba-inc.com>
Very nice suggestion! I have updated the related part according to your suggestion. |
Spec details: https://github.com/apache/rocketmq-externals/blob/a6978cf562db9aab00062704dc15bddf947df9bc/rocketmq-cloudevents-binding/rocketmq-transport-binding.md Signed-off-by: Aaron Ai <yangkun.ayk@alibaba-inc.com> Signed-off-by: Alex Collins <alex_collins@intuit.com>
Fixes #494