WIP Add conversion functions to get JmsMessages from jms.Messages #1787
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.
This makes it easy to get the Alpakka
JmsMessage
s with the body, all headers, and all JMS properties intact.This is a first pass, I only have so much time to work on this so wanted to get some discussion before going any further with anything else that will be required.
Purpose
JmsProducer
requires AlpakkaJmsMessage
model objects to produce messages in a flow (or plain body objects with no headers in a sink). While implementing a standard request/reply model, I found there was no automatic way to convert ajms.Message
to aJmsMessage
while keeping headers & properties intact (need fields such ascorrelationId
andreplyTo
from the original message).I added the missing standard JMS headers in
JmsHeader
, and added conversions fromjms.[Map|Text|Bytes|Object]Message
to their correspondingJmsMessage
instances.References
https://discuss.lightbend.com/t/alpakka-activemq-request-response-with-pooled-temporary-queues/4012/9
Changes
Background Context