blob: 186d6eac26b8858132ba840b80ee8b2c240b3a7d [file] [log] [blame]
<div class="wiki-content maincontent"><h2 id="CanImodifymessagesonaqueue-CanImodifymessagesonaqueue?">Can I modify messages on a queue?</h2>
<p>The short answer is no. In JMS messages are immutable once they have been sent. If you find you need to modify messages its recommended that you create a consumer with some selector which matches the messages you wish to update, consume them and send new modified messages, either to another queue or if you are careful, back to the original queue. (If you are using the same queue, be careful not to get into a loop where your selector matches messages you are sending yourself - you may wish to use some JMS header to avoid this loop).</p></div>