Hi,

How do I best copy a large message using JMS API?


I have a JMS listener that just wants to check the message and pass it along to 
another queue.

Simply sending the same incoming message is not possible (read only exception).


So I figured I need to copy the entire message content (might be GBs of data) 
to the new message copy. However, how is that possible without saving the data 
to a local temp file?

msg.setObjectProperty("JMS_HQ_SaveStream", output);

and

messageToTransfer.setObjectProperty("JMS_AMQ_InputStream”, input);

both blocks, so I don’t really know if it’s possible to stream from one large 
message to a new ”copy”.

How would you guys do such a thing without reading the entire file to a 
temporary space in the application?

Best regards
Petter Nordlander

Reply via email to