-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable CorrelationMetadata Emission on SenderMessageResults, Similar to Reactor-Kafka #109
Comments
@Sage-Pierce Thanks for the suggestion and the PR. This is an interesting feature to have, I'd like to integrate it as smoothly as possible into the library.
Maybe introducing new sub-classes of |
Thanks for the feedback, @acogoluegnes ! I agree with all of it. I like the idea of a two-step process with the addition of a new method that has the generic parameterization. Compiled, it will be the same thing as the current Will revise these changes |
With @SuppressWarnings annotation. References #109
[#109]Implement Correlation metadata on Sender OutboundMessages
Fixed in #110. |
The similar-minded project Reactor Kafka allows propagation of "Correlation Metadata" with sent Records: https://github.com/reactor/reactor-kafka/blob/master/src/main/java/reactor/kafka/sender/internals/DefaultKafkaSender.java#L116
It would be great to get this functionality implemented on Reactor RabbitMQ's Sender and OutboundMessage here:
https://github.com/reactor/reactor-rabbitmq/blob/master/src/main/java/reactor/rabbitmq/Sender.java#L187
Motivation
It is sometimes desired to be able to propagate information that is not strictly a subset of the information serialized on RabbitMQ messages. This information may be logical in nature, for example, a callback. There is not yet a place on OutboundMessage to propagate such information.
Reactor Kafka provides this ability as "correlation metadata" on sent SenderRecords. It should be fairly straightforward to add this functionality to OutboundMessage
Note that there is a TODO as a placeholder for this functionality:
https://github.com/reactor/reactor-rabbitmq/blob/master/src/main/java/reactor/rabbitmq/OutboundMessage.java#L36-L37
Desired solution
OutboundMessage will have generically parameterized
correlationMetadata
associated with each Message. The resulting send methods onSender
will be parameterized with this type informationConsidered alternatives
N/A
Additional context
We have a project that propagates callbacks to originating message emitters in order to notify "message processing has been completed or failed" (in this case, with an
ack
ornack
). We don't have this ability for usage with RabbitMQ in the absence ofcorrelationMetadata
onOutboundMessage
The text was updated successfully, but these errors were encountered: