How to access Msg.Metadata (delivery attempts, timestamp, etc.) using FastStream's NatsMessage? #2189
Unanswered
Atanusaha143
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You can get access to raw nats-py message by |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently using FastStream with the NATS backend (JetStream enabled) and trying to handle retries more intelligently based on delivery attempts.
NATS nats.py Msg.Metadata exposes very useful properties like:
But when I receive a message in FastStream like:
I don't have access to
.metadata
if trying to access it throws:💡 Question:
num_delivered
) in a FastStream consumer? If it is then how can we do that?🔍 Notes:
msg.body
works fine for payloads.Beta Was this translation helpful? Give feedback.
All reactions