Skip to content

Make SendToMethodReturnValueHandler and SubscriptionMethodReturnValueHandler customizable, to allow for pass-through of message headers #36168

@JohnHaze

Description

@JohnHaze

SendToMethodReturnValueHandler, SubscriptionMethodReturnValueHandler shall be customizable, in order to be able to pass through configured message headers of handled input messages.

Now: all message headers of input messages are discarded by mentioned ReturnValueHandlers.

Assuming a possibility to configure these handlers, it may be feasible to let message headers carried by input messages pass through into the messaging system while still using mentioned ReturnValueHandlers.
For example, this comes in handy for implementing receipt-header-assisted communication between producers and consumers.
Also, pass-through of other proprietary headers may enhance application implementations.

References:

@JohnHaze I do see how copying all headers fits well for a controller method that intercepts a message before forwarding it to the broker, but I can also see a case where the controller method handles the message, and sends a new one. Therefore I'm not sure this should be done always, but it does make sense to provide control and allow you to do this.

Could you create a new issue, and we'll look for a way to make SendToMethodReturnValueHandler and SubscriptionMethodReturnValueHandler customizeable?

Originally posted by @rstoyanchev in #16664

#16664 (comment)

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)status: supersededAn issue that has been superseded by anothertype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions