blob: 1e78b4e8b906f9668384de7fc0b03167622582c8 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.18">
<link rel="icon" type="image/png" href="images/favicon.png">
<title>Properties for Copied Messages</title>
<link rel="stylesheet" href="css/asciidoctor.css">
<link rel="stylesheet" href="css/font-awesome.css">
</head>
<body class="book">
<div id="header">
<h1>Properties for Copied Messages</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>There are several operations within the broker that result in copying a message.
These include:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Diverting a message from one address to another.</p>
</li>
<li>
<p>Moving an expired message from a queue to the configured <code>expiry-address</code></p>
</li>
<li>
<p>Moving a message which has exceeded its <code>max-delivery-attempts</code> from a queue to the configured <code>dead-letter-address</code></p>
</li>
<li>
<p>Using the management API to administratively move messages from one queue to another</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>When this happens the body and properties of the original message are copied to a new message.
However, the copying process removes some potentially important pieces of data so those are preserved in the following special message properties:</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">_AMQ_ORIG_ADDRESS</dt>
<dd>
<p>a String property containing the <em>original address</em> of the message</p>
</dd>
<dt class="hdlist1">_AMQ_ORIG_QUEUE</dt>
<dd>
<p>a String property containing the <em>original queue</em> of the message</p>
</dd>
<dt class="hdlist1">_AMQ_ORIG_MESSAGE_ID</dt>
<dd>
<p>a String property containing the <em>original message ID</em> of the message</p>
</dd>
</dl>
</div>
<div class="paragraph">
<p>It&#8217;s possible for the aforementioned operations to be combined.
For example, a message may be diverted from one address to another where it lands in a queue and a consumer tries &amp; fails to consume it such that the message is then sent to a dead-letter address.
Or a message may be administratively moved from one queue to another where it then expires.</p>
</div>
<div class="paragraph">
<p>In cases like these the <code>ORIG</code> properties will contain the information from the <em>last</em> (i.e. most recent) operation.</p>
</div>
</div>
</div>
</div>
</body>
</html>