How to handle AMQP messages #238
-
Hi, I have a fanout exchange that publishes to both classic queue and stream. When I consume from stream I get extra values inside
I could not copy all the extra data because browser does not let me paste it has weird characters I have seen this issue. I got confused whether should I parse this myself or the stream client should handle it? |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 9 replies
-
Which RabbitMQ and Client library are you using? |
Beta Was this translation helpful? Give feedback.
-
RabbitMQ 3.11.5 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Can you please provide a repo where I can reproduce the issue? |
Beta Was this translation helpful? Give feedback.
-
I write the contents of |
Beta Was this translation helpful? Give feedback.
-
@aeb-dev, if you don't provide more information I am afraid that we can't help.
|
Beta Was this translation helpful? Give feedback.
-
I will try to provide a reproducible example |
Beta Was this translation helpful? Give feedback.
-
@Gsantomaggio I want to make sure that I understand it right. Using your example, when I deserialize |
Beta Was this translation helpful? Give feedback.
-
This is probably related to us. I will report my findings when I find the problem |
Beta Was this translation helpful? Give feedback.
-
Sorry for late reply. You can use this repo to reproduce: https://github.com/aeb-dev/rabbitmq-stream-bug There are 3 variables you should configure to get the result. |
Beta Was this translation helpful? Give feedback.
-
Don't think you're supposed to store a reference to a
It's underlying memory regions could for example be re-used by the runtime at any time. I guess that's why you end up with corrupted data (json output) in the |
Beta Was this translation helpful? Give feedback.
Don't think you're supposed to store a reference to a
Message
outside the scope of theMessagehandler
Message.Data
is aReadOnlySequence<byte>
and in general, it is not safe to store references to ReadOnlySequence instances for later use.It's underlying memory regions could for example be re-used by the runtime at any time. I guess that's why you end up with corrupted data (json output) in the
Bugged()
scenario?