Skip to content

How to handle AMQP messages #238

Answered by jonnepmyra
aeb-dev asked this question in Q&A
Feb 21, 2023 · 11 comments · 9 replies
Discussion options

You must be logged in to vote

Don't think you're supposed to store a reference to a Message outside the scope of the Messagehandler

Message.Data is a ReadOnlySequence<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?

Replies: 11 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Gsantomaggio
Comment options

@aeb-dev
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Gsantomaggio
Comment options

@aeb-dev
Comment options

Comment options

You must be logged in to vote
5 replies
@lukebakken
Comment options

@aeb-dev
Comment options

@lukebakken
Comment options

@aeb-dev
Comment options

@lukebakken
Comment options

Answer selected by lukebakken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #237 on February 21, 2023 14:15.