How to access the Kafka "key" property when consuming? Or any other Kafka specific metadata?
Opened this issue · 1 comments
Following the README directions it's easy enough to set the topic and key value for a Kafka message using the TransportConfiguration stamp (header). However, I am not sure how to access that property when consuming the message back into the Symfony app either through the message handler class or through a custom serializer "decode()" method. Any feedback or help would be greatly appreciated. Perhaps an addition to the README docs showing a use case for consuming a Kafka message that utilized the TransportConfiguration stamp when being produced would be helpful. Thanks!
Hi @cousinjoe in messenger envelope there is an InteropMessageStamp (injected by QueueInteropTransport) with a RdKafkaMessage inside where you can find some metada.