ManageIQ / manageiq-messaging

MIT License
5 stars 26 forks source link

Allow extra headers to be passed with the message #46

Closed agrare closed 5 years ago

agrare commented 5 years ago

There are some cases where extra headers should be added to the message and there currently is no interface to be able to do that.

This adds the ability to pass other arbitrary headers in to publish_topic/publish_message.

bzwei commented 5 years ago

@agrare It is good to allow publisher to customize the header. How will the consumer parse the header?

agrare commented 5 years ago

@bzwei we have a requirement to pass the x-rh-identity headers from the REST API call in the kafka headers for the event we raise. I was thinking about blacklisting any internally set header keys so the caller couldn't mess with those, would that help alleviate your concern?

bzwei commented 5 years ago

@agrare Can you update the example and document how to parse user headers from consumer client? Any internally set headers should be blacklisted/removed/hidden from consumer.

agrare commented 5 years ago

Okay @bzwei I added some examples and am stripping internal header keys from the publish and the subscribe side of topic + queue for kafka + stomp, PTAL