Replies: 1 comment
-
i found the answer @broker.subscriber(
*["accounting_failed", "accounting_internal"],
group_id="group",
auto_commit=False,
)
async def handler(msg: str, key: bytes = Context("message.raw_message.key"),
headers: bytes = Context("message.raw_message.headers"),
topic: str = Context("message.raw_message.topic")):
print(key)
print(msg)
print(headers)
print(topic) |
Beta Was this translation helpful? Give feedback.
0 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.
-
here i my code
but how do I get the
key
andheaders
in my Kafka message?it just returns
body
in the messageBeta Was this translation helpful? Give feedback.
All reactions