Hi,

I have the following workflow which I assume is a pretty common use case:

1. Take a message from a JMS topic.
2. Save some of its attributes to the database.
3. Send the message to a different JMS topic
<more steps here..but not relevant for the question>

Step 1 and 2 are performed in an XA transaction.

After step 1, I have the JMS message in the body of the Camel's IN message.
But for step 2, I need a JPA entity as the body of the Camel's IN message.
For step 3, I need the original JMS message as the body of the Camel's IN
message.

So before step 2, I have a processor that takes the JMS message and stores
it as a property on the exchange. It then stores the JPA entity as the body
of the exchange's IN.
After step 2, I have another processor that restores the JMS message as the
body.

I feel that juggling the message body like this is not elegant and I may be
missing something.
Please let me know your thoughts.

Thanks!

Reply via email to