GH-6792: Add headers mapping to JMS channels#10837
Closed
artembilan wants to merge 1 commit into
Closed
Conversation
Fixes: #6792 Currently, by default `AbstractJmsChannel` implementations use Java serialization for storing `Message<?>` instance into JMS destination. The deserialized message is produced from the channel as is. There might be use-cases when some JMS properties could be useful in downstream flows. * Add `DefaultJmsHeaderMapper` into the `AbstractJmsChannel` as a conditional logic to map headers to/from JMS when `jmsTemplate.getMessageConverter()` is not a `MessagingMessageConverter`. Otherwise, then conversion of the message and header mapping is done in that converter * Refactor logic in the `AbstractJmsChannel` to common API * Fix Nullability formatting in the `PollableJmsChannel` * Use lambda style for `MessageListener` in the `SubscribableJmsChannel` instead of inner extra class * Ensure in the `PollableJmsChannelTests` and `SubscribableJmsChannelTests` that header mapper does it job * Fix `JmsChannelParserTests` to not assert on the `messageBuilderFactory` since now a `MessageListener` in the `SubscribableJmsChannel` is a direct method of the class * Fix `JmsChannelHistoryTests` verification according to a new internal logic of the `AbstractJmsChannel` * Document new feature in the `jms.adoc` and `whats-new.adoc`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #6792
Currently, by default
AbstractJmsChannelimplementations use Java serialization for storingMessage<?>instance into JMS destination. The deserialized message is produced from the channel as is. There might be use-cases when some JMS properties could be useful in downstream flows.DefaultJmsHeaderMapperinto theAbstractJmsChannelas a conditional logic to map headers to/from JMS whenjmsTemplate.getMessageConverter()is not aMessagingMessageConverter. Otherwise, then conversion of the message and header mapping is done in that converterAbstractJmsChannelto common APIPollableJmsChannelMessageListenerin theSubscribableJmsChannelinstead of inner extra classPollableJmsChannelTestsandSubscribableJmsChannelTeststhat header mapper does it jobJmsChannelParserTeststo not assert on themessageBuilderFactorysince now aMessageListenerin theSubscribableJmsChannelis a direct method of the classJmsChannelHistoryTestsverification according to a new internal logic of theAbstractJmsChanneljms.adocandwhats-new.adoc