activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakub Korab (Confluence)" <conflue...@apache.org>
Subject [CONF] Apache ActiveMQ > Networks of Brokers
Date Wed, 09 Dec 2015 11:28:02 GMT
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> 
<base href="https://cwiki.apache.org/confluence"> 
<title>Message Title</title>  
<style type="text/css">@media only screen and (max-device-width: 480px) {.mobile-only {
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    line-height: normal !important;
    font-size: inherit !important;
    mso-hide: all;
}

.desktop-only {
    display: none !important;
}

/* iPhone 3GS fix for unwanted 20px right margin */
body {
    min-width: 100% !important;
    padding: 0;
    margin: 0;
}

#center-content-table {
    max-width: none;
!important;
}

#header-pattern-container {
    padding: 10px 10px 10px 10px !important;
    line-height: 20px !important;
}

#header-avatar-image-container {
    padding-right: 8px !important;
}

#email-content-container {
    padding: 0 !important;
}

.mobile-expand {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding-left: 26px !important;
}

.mobile-resize-text {
    font-size: 16px !important;
    line-height: 22px !important;
}

#page-title-pattern-header {
    font-size: 20px !important;
    line-height: 28px !important;
}

#page-title-pattern-icon-image-container-cell {
    padding-top: 7px !important;
}

#inline-user-pattern {
    display: block !important;
}

#inline-user-pattern-avatar {
    padding-top: 3px !important;
}

.contextual-area-pattern {
    border-bottom: 1px solid #ccc !important;
    padding: 15px 10px 0 10px !important;
}

.users-involved-pattern-column-table {
    width: 100% !important;
}

.users-involved-pattern-avatar-table-cell {
    padding: 3px 5px 5px 0 !important;
}

.users-involved-pattern-column-container {
    padding-right: 0 !important;
}

.contextual-excerpt-pattern, #users-involved-pattern {
    border: 0 !important;
}

/** Aui Typography upsized for mobile **/
#content-excerpt-pattern-container, #contextual-excerpt-pattern-text-container {
    font-size: 16px !important;
    line-height: 22px !important;
}

#content-excerpt-pattern-container h1, #contextual-excerpt-pattern-text-container h1 {
    font-size: 24px !important;
    line-height: 28px !important;
}

#content-excerpt-pattern-container h2, #contextual-excerpt-pattern-text-container h2 {
    font-size: 20px !important;
    line-height: 28px !important;
}

#content-excerpt-pattern-container h3, #contextual-excerpt-pattern-text-container h3 {
    font-size: 18px !important;
    line-height: 24px !important;
}

#content-excerpt-pattern-container h4, #contextual-excerpt-pattern-text-container h4 {
    font-size: 16px !important;
    line-height: 22px !important;
}

#content-excerpt-pattern-container h5, #contextual-excerpt-pattern-text-container h5 {
    font-size: 14px !important;
    line-height: 20px !important;
}

#content-excerpt-pattern-container h6, #contextual-excerpt-pattern-text-container h6 {
    font-size: 14px !important;
    line-height: 20px !important;
}

.user-mention {
    line-height: 18px !important;
}

/** Aui Typography end **/

/* Show appropriate footer logo on mobile, display links vertically */
#footer-pattern {
    padding: 15px 10px !important;
}

#footer-pattern-logo-desktop-container {
    padding: 0 !important;
}

#footer-pattern-logo-desktop {
    width: 0 !important;
    height: 0 !important;
}

#footer-pattern-logo-mobile {
    padding-top: 10px !important;
    width: 30px !important;
    height: 27px !important;
    display: inline !important;
}

#footer-pattern-text {
    display: block !important;
}

#footer-pattern-links-container {
    line-height: 0 !important;
}

.footer-pattern-links.mobile-resize-text,
.footer-pattern-links.mobile-resize-text,
#footer-pattern-text.mobile-resize-text,
#footer-pattern-links-container.no-footer-links {
    font-size: 14px !important;
    line-height: 20px !important;
}

.footer-link {
    display: block !important;
}

#footer-pattern-links-container table {
    display: inline-block !important;
    float: none !important;
}

#footer-pattern-links-container, #footer-pattern-text {
    text-align: center !important;
}

#footer-pattern-links {
    padding-bottom: 5px !important;
}

/** Team Calendar overrides, these should be removed when notifications are updated in Team Calendars. For now CSS
    overrides are being used because the structure of the content can't change without rereleasing the plugin */
.mail-calendar-container .day-header + table tr td:first-child {
    vertical-align: top !important;
    padding-top: 5px !important;
}}
@media (min-width: 900px) {#center-content-table { width: 900px; }}
@media all {#outlook a {
    padding: 0;
}

/* Force Outlook to provide a "view in browser" menu link. */
/* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/
body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

.ExternalClass {
    width: 100%;
}

/* Force Hotmail to display emails at full width */
#background-table {
    margin: 0;
    padding: 0;
    width: 100% !important;
}

/* Needed to override highlighting on date and time links in iOS */
.grey a {
    color: #707070;
    text-decoration: none;
}/* These styles are appended to the head element of a notification in order to prevent Apple Mail and similar
   clients from underlining the due dates with a blue hyperlink */
/* a lozenge outside an inline task should always be #333, lozenges inside an inline task should be
   colored according to their upcoming due dates, a completed task date lozenge or deleted task date
   lozenge should always be #707070 */
.date-time-lozenge a {color: #333333; text-decoration: none; }
.inline-task-text-container .date-time-lozenge.date-upcoming a {color: #DF6F00; text-decoration: none; }
.inline-task-text-container .date-time-lozenge.date-past a {color: #D04437; text-decoration: none; }
.inline-task-text-container.content-deleted-color .date-time-lozenge a,
.inline-task-text-container.checked .date-time-lozenge a {
    color: #707070; text-decoration: none;
}}
</style> 
</head>
<body>
<table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; background-color: #f5f5f5"> 
<tbody> 
<tr> 
<td id="header-pattern-container" style="padding: 0px; border-collapse: collapse; padding: 10px 20px"> 
<table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td id="header-avatar-image-container" valign="top" style="padding: 0px; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 9px"><a href="https://cwiki.apache.org/confluence/display/~jkorab?src=mail&amp;src.mail.timestamp=1449660481701&amp;src.mail.notification=com.atlassian.confluence.plugins.confluence-content-notifications-plugin%3Apage-edited-notification&amp;src.mail.recipient=8aa980874e36a1eb014e36a2a6263ca9" style="color: #3b73af; text-decoration: none"><img id="header-avatar-image" class="image_fix" src="cid:avatar_7e13ba699c0bd7fe0549e0fcac27eee7" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top"></a></td>
<td id="header-text-container" valign="middle" style="padding: 0px; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px">Jakub Korab <strong>edited</strong> a page</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<!-- End Header pattern --> 
<tr> 
<td id="email-content-container" style="padding: 0px; border-collapse: collapse; padding: 0 20px"> 
<table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; border-spacing: 0; border-collapse: separate"> 
<tbody> 
<tr> 
<td class="email-content-rounded-top mobile-expand" style="padding: 0px; border-collapse: collapse; color: #fff; padding: 0 15px 0 16px; height: 15px; background-color: #fff; border-left: 1px solid #ccc; border-top: 1px solid #ccc; border-right: 1px solid #ccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px">&nbsp;</td> 
</tr> 
<tr> 
<td class="email-content-main mobile-expand" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 15px 16px; background-color: #fff"> 
<table class="notification-comment-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
<tbody> 
<tr> 
<td class="notification-comment-pattern-container mobile-resize-text" style="padding: 0px; border-collapse: collapse; padding: 0px"><strong>Change comment:</strong> Cleared up description of "Dynamic networks and Virtual Destinations" to make it more understandable. Added formatting to config properties for easier readability.</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td class="email-content-main mobile-expand padding-top border-top" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 15px 16px; background-color: #fff; border-top: 1px solid #ccc; padding-top: 15px"> 
<table id="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td id="page-title-pattern-icon-image-container" valign="top" style="padding: 0px; border-collapse: collapse; width: 16px; vertical-align: top"> 
<table cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td id="page-title-pattern-icon-image-container-cell" style="padding: 0px; border-collapse: collapse; width: 16px; padding: 9px 8px 0px 0px; mso-text-raise: 5px; mso-line-height-rule: exactly"><a href="https://cwiki.apache.org/confluence/display/ACTIVEMQ/Networks+of+Brokers?src=mail&amp;src.mail.timestamp=1449660481701&amp;src.mail.notification=com.atlassian.confluence.plugins.confluence-content-notifications-plugin%3Apage-edited-notification&amp;src.mail.recipient=8aa980874e36a1eb014e36a2a6263ca9&amp;src.mail.action=view" title="page icon" style="vertical-align: top;; color: #3b73af; text-decoration: none"><img style="vertical-align: top; display: block;" src="cid:page-icon" alt="page icon" title="page icon" height="16" width="16" border="0"></a></td> 
</tr> 
</tbody> 
</table> </td>
<td style="vertical-align: top;; padding: 0px; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" id="page-title-pattern-header-container"><span id="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"><a href="https://cwiki.apache.org/confluence/display/ACTIVEMQ/Networks+of+Brokers?src=mail&amp;src.mail.timestamp=1449660481701&amp;src.mail.notification=com.atlassian.confluence.plugins.confluence-content-notifications-plugin%3Apage-edited-notification&amp;src.mail.recipient=8aa980874e36a1eb014e36a2a6263ca9&amp;src.mail.action=view" title="Networks of Brokers" style="color: #3b73af; text-decoration: none">Networks of Brokers</a></span></td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td class="email-content-main mobile-expand" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 15px 16px; background-color: #fff"> 
<table class="content-excerpt-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
<tbody> 
<tr> 
<td class="content-excerpt-pattern-container mobile-resize-text " style="padding: 0px; border-collapse: collapse; padding: 0 0 0 24px"> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <p class="diff-block-target" style="margin: 10px 0 0 0">However - duplicate subscriptions is a useful feature to exploit if you are only using Queues. As the load balancing algorithm will attempt to share message load evenly, consumers across a network will equally share the message load only if the flag <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-0" style="background-color: #d6f0ff;">conduitSubscriptions=false</span></code>. Here's an example. Suppose you have two brokers, A and B, that are connected to one another via a forwarding bridge. Connected to broker A, you have a consumer that subscribes to a queue called <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-1" style="background-color: #d6f0ff;">Q.TEST</span></code>. Connected to broker B, you have two consumers that also subscribe to <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-2" style="background-color: #d6f0ff;">Q.TEST</span></code>. All consumers have equal priority. Then you start a producer on broker A that writes 30 messages to <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-3" style="background-color: #d6f0ff;">Q.TEST</span></code>. By default, (<code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-4" style="background-color: #d6f0ff;">conduitSubscriptions=true</span></code>), 15 messages will be sent to the consumer on broker A and the resulting 15 messages will be sent to the two consumers on broker B. The message load has not been equally spread across all three consumers because, by default, broker A views the two subscriptions on broker B as one. If you had set <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-5" style="background-color: #d6f0ff;">conduitSubscriptions</span></code><span class="diff-html-removed" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;"> </span><span class="diff-html-removed" id="removed-diff-0" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">to "</span><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;"> </span><span class="diff-html-added" id="added-diff-0" style="font-size: 100%; background-color: #ddfade;">to&nbsp;</span><code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-6" style="background-color: #d6f0ff;">false</span></code><span class="diff-html-removed" id="removed-diff-1" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">"</span>, then each of the three consumers would have been given 10 messages.</p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <p class="diff-block-target" style="margin: 10px 0 0 0">By default a network bridge forwards messages on demand in one direction over a single connection. When <span class="diff-html-removed" id="removed-diff-2" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">dupex</span><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;"> </span><code style="font-family: monospace"><span class="diff-html-added" id="added-diff-1" style="font-size: 100%; background-color: #ddfade;">duplex</span><span class="diff-html-changed" id="changed-diff-7" style="background-color: #d6f0ff;">=true</span></code>, the same connection is used for a network bridge in the opposite directions, resulting in a <span class="diff-html-removed" id="removed-diff-3" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">by </span><span class="diff-html-added" id="added-diff-2" style="font-size: 100%; background-color: #ddfade;">bi-</span>directional bridge. The network bridge configuration is propagated to the other broker so the duplex bridge is an exact replica or the original.</p> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <br> Given two brokers, broker A and broker B, a duplex bridge on A to B is the same as a default bridge on A to B and a default bridge on B to A.</p> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <br> Note, if you want to configure more than one duplex network bridge between two brokers, to increase throughput or to partition topics and queues, you must provide unique names for each:<span class="diff-html-removed" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;"> </span><span class="diff-html-removed" id="removed-diff-4" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">eg:</span> </p> 
<table class="diff-macro diff-block-context" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse"></td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse"></td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;networkConnectors&gt;
        &lt;networkConnector name="SYSTEM1" duplex="true" uri="static:(tcp://10.x.x.x:61616)"&gt;
                &lt;dynamicallyIncludedDestinations&gt;
                        &lt;topic physicalName="outgoing.System1" /&gt;
                &lt;/dynamicallyIncludedDestinations&gt;
        &lt;/networkConnector&gt;
        &lt;networkConnector name="SYSTEM2" duplex="true" uri="static:(tcp://10.x.x.x:61616)"&gt;
                &lt;dynamicallyIncludedDestinations&gt;
                        &lt;topic physicalName="outgoing.System2"/&gt;
                &lt;/dynamicallyIncludedDestinations&gt;
        &lt;/networkConnector&gt;
  &lt;/networkConnectors&gt;</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> 
<table class="diff-macro diff-block-target" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/macrobrowser/dropdown/warning.png" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Warning</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <p style="margin: 10px 0 0 0; margin-top: 0">Networks do not work as expected (they cannot dynamically respond to new consumers) if the <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-10" style="background-color: #d6f0ff;">advisorySupport</span></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>broker property is disabled. A fully statically configured network is the only option if <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-11" style="background-color: #d6f0ff;">advisorySupport</span></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>is disabled. Read more about it in the following section<span class="diff-html-added" id="added-diff-3" style="font-size: 100%; background-color: #ddfade;">.</span> </p> </td> 
</tr> 
</tbody> 
</table> <h3 id="NetworksofBrokers-Networksofbrokersandadvisories" class="diff-block-context" style="margin: 10px 0 0 0; font-size: 16px; line-height: 25px; margin: 30px 0 0 0">Networks of brokers and advisories</h3> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> 
<table class="diff-macro diff-block-context" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse"></td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse"></td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;networkConnector uri="static:(tcp://host)"&gt;
  &lt;dynamicallyIncludedDestinations&gt;
    &lt;queue physicalName="include.test.foo"/&gt;
    &lt;topic physicalName="include.test.bar"/&gt;
  &lt;/dynamicallyIncludedDestinations&gt;
&lt;/networkConnector&gt;</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0">In <span class="diff-html-removed" id="removed-diff-5" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">earlier </span>versions of ActiveMQ <span class="diff-html-added" id="added-diff-4" style="font-size: 100%; background-color: #ddfade;">prior to 5.6</span>, the broker would still use the same advisory filter and express interest in all consumers on the remote broker. The actual filtering will be done during message dispatch. This is suboptimal solution in huge networks as it creates a lot of "advisory" traffic and load on the brokers. Starting with version 5.6, the broker will automatically create an appropriate advisory filter and express interest only in dynamically included destinations. For our example it will be <span class="diff-html-added" id="added-diff-5" style="font-size: 100%; background-color: #ddfade;">"</span><code style="font-family: monospace">ActiveMQ.Advisory.Consumer.Queue.include.test.foo,ActiveMQ.Advisory.Consumer.Topic.include.test.bar</code><span class="diff-html-added" id="added-diff-6" style="font-size: 100%; background-color: #ddfade;">"</span>. This can dramatically improve behavior of the network in complex and high-load environments.</p> <p class="diff-block-target" style="margin: 10px 0 0 0"> <span class="diff-html-removed" id="removed-diff-6" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">So what's to be done in older versions of the broker? Luckily, </span><span class="diff-html-added" id="added-diff-7" style="font-size: 100%; background-color: #ddfade;">In older broker versions </span>we can achieve the same thing with a <span class="diff-html-removed" id="removed-diff-7" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">bit </span><span class="diff-html-added" id="added-diff-8" style="font-size: 100%; background-color: #ddfade;">slightly </span>more complicated configuration. The actual advisory filter that controls in which consumers we are interested is defined with the <code style="font-family: monospace">destinationFilter</code> connector property. <span class="diff-html-removed" id="removed-diff-8" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">It's </span><span class="diff-html-added" id="added-diff-9" style="font-size: 100%; background-color: #ddfade;">Its </span>default value is <span class="diff-html-added" id="added-diff-10" style="font-size: 100%; background-color: #ddfade;">"</span><span class="diff-html-changed" id="changed-diff-12" style="background-color: #d6f0ff;">&gt;</span><span class="diff-html-added" id="added-diff-11" style="font-size: 100%; background-color: #ddfade;">"</span>, which is concatenated to the <code style="font-family: monospace"><span class="diff-html-added" id="added-diff-12" style="font-size: 100%; background-color: #ddfade;">"</span>ActiveMQ.Advisory.Consumer.<span class="diff-html-added" id="added-diff-13" style="font-size: 100%; background-color: #ddfade;">"</span></code><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;"> </span>prefix. So to achieve the same thing<span class="diff-html-added" id="added-diff-14" style="font-size: 100%; background-color: #ddfade;">, </span>we would need to do the following<span class="diff-html-added" id="added-diff-15" style="font-size: 100%; background-color: #ddfade;">:</span> </p> 
<table class="diff-macro diff-block-context" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse"></td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse"></td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;networkConnector uri="static:(tcp://host)" destinationFilter="Queue.include.test.foo,ActiveMQ.Advisory.Consumer.Topic.include.test.bar"&gt;
  &lt;dynamicallyIncludedDestinations&gt;
    &lt;queue physicalName="include.test.foo"/&gt;
    &lt;topic physicalName="include.test.bar"/&gt;
  &lt;/dynamicallyIncludedDestinations&gt;
&lt;/networkConnector&gt;</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-block-target" style="margin: 10px 0 0 0">Note that first destination <span class="diff-html-removed" id="removed-diff-9" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">doesn't </span><span class="diff-html-added" id="added-diff-16" style="font-size: 100%; background-color: #ddfade;">does not </span>have the prefix because it's already implied. It's a bit more complicated to set and maintain, but it will work. And if you're using 5.6 or newer version of the broker just including desired destinations with <code style="font-family: monospace">dynamicallyIncludedDestinations</code> should suffice.</p> <p class="diff-block-target" style="margin: 10px 0 0 0">This also explains why dynamic networks <span class="diff-html-removed" id="removed-diff-10" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">doesn't </span><span class="diff-html-added" id="added-diff-17" style="font-size: 100%; background-color: #ddfade;">do not </span>work if you turn off advisory support on the brokers. The brokers in this case cannot dynamically respond to new consumers.</p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <p class="diff-block-target" style="margin: 10px 0 0 0">The <code style="font-family: monospace">staticBridge</code> parameter is available since version 5.6 and it means that <span class="diff-html-added" id="added-diff-18" style="font-size: 100%; background-color: #ddfade;">the local </span>broker will not subscribe to any advisory <span class="diff-html-removed" id="removed-diff-11" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">topic </span><span class="diff-html-added" id="added-diff-19" style="font-size: 100%; background-color: #ddfade;">topics </span>on the remote broker, meaning it is not interested in <span class="diff-html-added" id="added-diff-20" style="font-size: 100%; background-color: #ddfade;">whether there are </span>any consumers there. Additionally, you need to add a list of destinations to <code style="font-family: monospace">staticallyIncludedDestinations</code>. This will have the same effect as having an additional consumer on the destinations so messages will be forwarded to the remote broker as well. As there <span class="diff-html-removed" id="removed-diff-12" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">'s </span><span class="diff-html-added" id="added-diff-21" style="font-size: 100%; background-color: #ddfade;">is </span>no <code style="font-family: monospace">staticBridge</code> parameter in the earlier versions of ActiveMQ, you can trick the broker by setting <code style="font-family: monospace">destinationFilter</code> to listen to an unused advisory topic, like</p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <p class="diff-block-target" style="margin: 10px 0 0 0">Here is an example of two brokers networked together. &nbsp;The <span class="diff-html-removed" id="removed-diff-13" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">local broker </span><span class="diff-html-added" id="added-diff-22" style="font-size: 100%; background-color: #ddfade;">Local Broker </span>contains the network connector configured with a&nbsp;<code style="font-family: monospace">dynamicallyIncludedDestination</code>&nbsp;and the <span class="diff-html-removed" id="removed-diff-14" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">remote broker </span><span class="diff-html-added" id="added-diff-23" style="font-size: 100%; background-color: #ddfade;">Remote Broker </span>is configured with a CompositeTopic:</p> 
<table class="diff-macro diff-block-target" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">language</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">title</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">Local Broker</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;networkConnector uri="static:(tcp://host)"&gt;
	&lt;dynamicallyIncludedDestinations&gt;
    	&lt;topic physicalName="include.<span class="diff-html-removed" id="removed-diff-15" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar"/&gt;
	&lt;/dynamicallyIncludedDestinations&gt;
&lt;/networkConnector&gt;</pre> </td> 
</tr> 
</tbody> 
</table> 
<table class="diff-macro diff-block-target" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">language</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">title</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">Remote Broker</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;compositeTopic name="include.<span class="diff-html-removed" id="removed-diff-16" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar" forwardOnly="false"&gt;
    &lt;forwardTo&gt;
        &lt;queue physicalName="include.<span class="diff-html-removed" id="removed-diff-17" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar.forward" /&gt;
    &lt;/forwardTo&gt;
&lt;/compositeTopic &gt;</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-block-target" style="margin: 10px 0 0 0">In this example, let's consider a single consumer on the <span class="diff-html-removed" id="removed-diff-18" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">remote broker </span><span class="diff-html-added" id="added-diff-24" style="font-size: 100%; background-color: #ddfade;">Remote Broker </span>on the queue <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-13" style="background-color: #d6f0ff;">include.</span></code><span class="diff-html-removed" id="removed-diff-19" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span><code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-14" style="background-color: #d6f0ff;">bar.forward</span></code>. &nbsp;If a message is sent directly to the <span class="diff-html-removed" id="removed-diff-20" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">remote broker </span><span class="diff-html-added" id="added-diff-25" style="font-size: 100%; background-color: #ddfade;">Remote Broker </span>on the topic&nbsp;<code style="font-family: monospace">include.<span class="diff-html-removed" id="removed-diff-21" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar</code><span class="diff-html-changed" id="changed-diff-15" style="background-color: #d6f0ff;">, </span><span class="diff-html-removed" id="removed-diff-22" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">it&nbsp;will </span><span class="diff-html-added" id="added-diff-26" style="font-size: 100%; background-color: #ddfade;">it&nbsp;will </span>be forwarded to the queue&nbsp;<code style="font-family: monospace">include.<span class="diff-html-removed" id="removed-diff-23" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar.<span class="diff-html-removed" id="removed-diff-24" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">forward&nbsp;</span></code><span class="diff-html-removed" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">and </span><code style="font-family: monospace"><span class="diff-html-added" id="added-diff-27" style="font-size: 100%; background-color: #ddfade;">forward</span></code><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">&nbsp;and </span>the consumer will receive it. &nbsp;However, if a message is published to the same topic on the <span class="diff-html-removed" id="removed-diff-25" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">local broker</span><span class="diff-html-added" id="added-diff-28" style="font-size: 100%; background-color: #ddfade;">Local Broker</span>, this message will not be forwarded to the <span class="diff-html-removed" id="removed-diff-26" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">remote broker</span><span class="diff-html-added" id="added-diff-29" style="font-size: 100%; background-color: #ddfade;">Remote Broker</span>.</p> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0">The message is not forwarded because a consumer on the&nbsp;<code style="font-family: monospace">queue&nbsp;include.<span class="diff-html-removed" id="removed-diff-27" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar.forward</code>&nbsp;would not be detected as part of the&nbsp;<code style="font-family: monospace">dynamicallyIncludedDestinations</code>&nbsp;list <span class="diff-html-removed" id="removed-diff-28" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">so messages </span><span class="diff-html-added" id="added-diff-30" style="font-size: 100%; background-color: #ddfade;">in the Local Broker.&nbsp; Messages </span>would not be forwarded to the <span class="diff-html-removed" id="removed-diff-29" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">remote broker </span><span class="diff-html-added" id="added-diff-31" style="font-size: 100%; background-color: #ddfade;">Remote Broker </span>unless there was a consumer on the original topic as well <span class="diff-html-removed" id="removed-diff-30" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">, </span><span class="diff-html-added" id="added-diff-32" style="font-size: 100%; background-color: #ddfade;">(</span>in this case <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-16" style="background-color: #d6f0ff;">include.</span></code><span class="diff-html-removed" id="removed-diff-31" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span><code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-17" style="background-color: #d6f0ff;">bar</span></code><span class="diff-html-added" id="added-diff-33" style="font-size: 100%; background-color: #ddfade;">)</span>. &nbsp;This can be fixed by configuring the <span class="diff-html-removed" id="removed-diff-32" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">broker </span><span class="diff-html-added" id="added-diff-34" style="font-size: 100%; background-color: #ddfade;">Local Broker </span>to listen for Virtual Destination Subscriptions. &nbsp;</p> <p class="diff-block-target" style="margin: 10px 0 0 0">First, we need to configure the <span class="diff-html-removed" id="removed-diff-33" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">broker </span><span class="diff-html-added" id="added-diff-35" style="font-size: 100%; background-color: #ddfade;">Remote Broker </span>to send advisory messages when consumers <span class="diff-html-removed" id="removed-diff-34" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">come online onto </span><span class="diff-html-added" id="added-diff-36" style="font-size: 100%; background-color: #ddfade;">subscribe to </span>a destination that matches a Virtual Destination. &nbsp;In this case, <span class="diff-html-added" id="added-diff-37" style="font-size: 100%; background-color: #ddfade;">internally </span>a match is determined <span class="diff-html-removed" id="removed-diff-35" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">by </span><span class="diff-html-added" id="added-diff-38" style="font-size: 100%; background-color: #ddfade;">through </span>the use of a Destination Filter <span class="diff-html-removed" id="removed-diff-36" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">will determines if a a </span><span class="diff-html-added" id="added-diff-39" style="font-size: 100%; background-color: #ddfade;">that determines whether one </span>destination forwards to another destination.<span class="diff-html-removed" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;"> </span><span class="diff-html-removed" id="removed-diff-37" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">&nbsp;The configuration on the remote broker should be updated to </span><span class="diff-html-added" id="added-diff-40" style="font-size: 100%; background-color: #ddfade;">&nbsp; To enable this, </span>set the property <code style="font-family: monospace">useVirtualDestSubs</code> <span class="diff-html-added" id="added-diff-41" style="font-size: 100%; background-color: #ddfade;">on the Remote Broker </span>to <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-18" style="background-color: #d6f0ff;">true</span></code><span class="diff-html-removed" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;"> </span><span class="diff-html-removed" id="removed-diff-38" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">to enable this.</span><span class="diff-html-added" id="added-diff-42" style="font-size: 100%; background-color: #ddfade;">:</span> </p> 
<table class="diff-macro diff-block-target diff-block-context" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">language</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">title</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">Remote Broker</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;beans xmlns="http://activemq.org/config/1.0"&gt;

  &lt;broker name="<span class="diff-html-removed" id="removed-diff-39" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">broker1</span><span class="diff-html-added" id="added-diff-43" style="font-size: 100%; background-color: #ddfade;">remoteBroker</span>" useVirtualDestSubs="true"&gt;  
     .....
  &lt;/broker&gt;

&lt;/beans&gt;
</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-block-target" style="margin: 10px 0 0 0"> <br> <span class="diff-html-removed" id="removed-diff-40" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">Second</span><span class="diff-html-added" id="added-diff-44" style="font-size: 100%; background-color: #ddfade;">Next</span>, <span class="diff-html-removed" id="removed-diff-41" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">we need to configure </span>the network connector <span class="diff-html-added" id="added-diff-45" style="font-size: 100%; background-color: #ddfade;">on the Local Broker needs </span>to <span class="diff-html-added" id="added-diff-46" style="font-size: 100%; background-color: #ddfade;">be configured to </span>listen for the new advisory messages <span class="diff-html-added" id="added-diff-47" style="font-size: 100%; background-color: #ddfade;">by setting the </span><code style="font-family: monospace"><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">useVirtualDestSubs</span></code><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;"> property to </span><code style="font-family: monospace"><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">true</span></code>:</p> 
<table class="diff-macro diff-block-target diff-block-context" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">language</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">title</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">Local Broker</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;networkConnector uri="static:(tcp://host)" useVirtualDestSubs="true"&gt;
  &lt;dynamicallyIncludedDestinations&gt;
    &lt;topic physicalName="include.<span class="diff-html-removed" id="removed-diff-42" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar"/&gt;
  &lt;/dynamicallyIncludedDestinations&gt;
&lt;/networkConnector&gt;</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0">Now, if a consumer comes <span class="diff-html-removed" id="removed-diff-43" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">online for </span><span class="diff-html-added" id="added-diff-48" style="font-size: 100%; background-color: #ddfade;">subscribes to </span>the queue&nbsp;<code style="font-family: monospace">include.<span class="diff-html-removed" id="removed-diff-44" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar.forward</code>&nbsp;on the <span class="diff-html-removed" id="removed-diff-45" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">remote broker</span><span class="diff-html-added" id="added-diff-49" style="font-size: 100%; background-color: #ddfade;">Remote Broker</span>, the <span class="diff-html-removed" id="removed-diff-46" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">local broker </span><span class="diff-html-added" id="added-diff-50" style="font-size: 100%; background-color: #ddfade;">Local Broker </span>will <span class="diff-html-removed" id="removed-diff-47" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">know to </span>forward messages that are sent to the topic&nbsp;<code style="font-family: monospace">include.<span class="diff-html-removed" id="removed-diff-48" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test</span><span class="diff-html-added" id="added-diff-51" style="font-size: 100%; background-color: #ddfade;">bar</span>.<span class="diff-html-removed" id="removed-diff-49" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">bar</span></code> </p> <h4 id="NetworksofBrokers-VirtualDestinationConsumersonDestinationCreation" class="diff-block-target diff-block-context" style="margin: 10px 0 0 0; font-size: 14px; line-height: 20px; margin: 20px 0 0 0"> <span class="diff-html-changed" id="changed-diff-19" style="background-color: #d6f0ff;">Virtual Destination </span> </h4> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <h4 id="NetworksofBrokers-VirtualDestinationConsumersonDestinationCreation" class="diff-block-target diff-block-context" style="margin: 10px 0 0 0; font-size: 14px; line-height: 20px; margin: 20px 0 0 0"> <span class="diff-html-added" id="added-diff-52" style="font-size: 100%; background-color: #ddfade;">Consumers </span><span class="diff-html-changed" id="changed-diff-20" style="background-color: #d6f0ff;">on </span> </h4> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <h4 id="NetworksofBrokers-VirtualDestinationConsumersonDestinationCreation" class="diff-block-target diff-block-context" style="margin: 10px 0 0 0; font-size: 14px; line-height: 20px; margin: 20px 0 0 0"> <span class="diff-html-added" id="added-diff-53" style="font-size: 100%; background-color: #ddfade;">Destination </span><span class="diff-html-changed" id="changed-diff-21" style="background-color: #d6f0ff;">Creation</span> </h4> <p class="diff-block-context" style="margin: 10px 0 0 0">Now let's consider the use case above where there is the same composite topic but no consumers on the queue.<br>&nbsp;</p> 
<table class="diff-macro diff-block-target diff-block-context" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">language</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">title</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">Remote Broker</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;compositeTopic name="include.<span class="diff-html-removed" id="removed-diff-52" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar" forwardOnly="false"&gt;
    &lt;forwardTo&gt;
        &lt;queue physicalName="include.<span class="diff-html-removed" id="removed-diff-53" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span>bar.forward" /&gt;
    &lt;/forwardTo&gt;
&lt;/compositeTopic &gt;</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0">There is a <span class="diff-html-removed" id="removed-diff-54" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">composite </span><span class="diff-html-added" id="added-diff-54" style="font-size: 100%; background-color: #ddfade;">Composite </span>Topic configured on the <span class="diff-html-removed" id="removed-diff-55" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">remote broker </span><span class="diff-html-added" id="added-diff-55" style="font-size: 100%; background-color: #ddfade;">Remote Broker, </span>and the <span class="diff-html-removed" id="removed-diff-56" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">local broker </span><span class="diff-html-added" id="added-diff-56" style="font-size: 100%; background-color: #ddfade;">Local Broker </span>is networked to it. <span class="diff-html-removed" id="removed-diff-57" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">&nbsp;Even </span><span class="diff-html-added" id="added-diff-57" style="font-size: 100%; background-color: #ddfade;">&nbsp;</span> </p> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">Even </span>though we <span class="diff-html-removed" id="removed-diff-58" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">'ve </span><span class="diff-html-added" id="added-diff-58" style="font-size: 100%; background-color: #ddfade;">have </span>enabled <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-22" style="background-color: #d6f0ff;">useVirtualDestSubs</span></code>, messages <span class="diff-html-removed" id="removed-diff-59" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">wouldn't </span><span class="diff-html-added" id="added-diff-59" style="font-size: 100%; background-color: #ddfade;">will not </span>be forwarded to the <span class="diff-html-removed" id="removed-diff-60" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">remote broker </span><span class="diff-html-added" id="added-diff-60" style="font-size: 100%; background-color: #ddfade;">Remote Broker </span>unless a consumer <span class="diff-html-removed" id="removed-diff-61" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">comes online </span><span class="diff-html-added" id="added-diff-61" style="font-size: 100%; background-color: #ddfade;">subscribes </span>to the forwarded queue.<span class="diff-html-removed" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;"> </span><span class="diff-html-removed" id="removed-diff-62" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">&nbsp;This would cause messages to </span><span class="diff-html-added" id="added-diff-62" style="font-size: 100%; background-color: #ddfade;">&nbsp; Without a consumer, messages would </span>be dropped <span class="diff-html-removed" id="removed-diff-63" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">since </span><span class="diff-html-added" id="added-diff-63" style="font-size: 100%; background-color: #ddfade;">as </span>they are sent to a topic <span class="diff-html-removed" id="removed-diff-64" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">. &nbsp;Sometimes </span><span class="diff-html-added" id="added-diff-64" style="font-size: 100%; background-color: #ddfade;">on the Local Broker (</span><code style="font-family: monospace"><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">include.bar</span></code><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">).&nbsp; In this situation </span>it is desirable to have <span class="diff-html-removed" id="removed-diff-65" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">these </span>messages forwarded based on the existence of <span class="diff-html-removed" id="removed-diff-66" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">the </span><span class="diff-html-added" id="added-diff-65" style="font-size: 100%; background-color: #ddfade;">a </span>virtual destination <span class="diff-html-removed" id="removed-diff-67" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">. &nbsp;This only applies in the Queue case. For topics, messages should only be forwarded if there is a consumer or durable subscription.</span><span class="diff-html-added" id="added-diff-66" style="font-size: 100%; background-color: #ddfade;">that forwards to:</span> </p> 
<ul class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> 
<li> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">one or more queues; or</span> </li> 
<li> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">topics that have durable subscriptions.</span> </li> 
</ul> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">&nbsp;</span> </p> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">Both of these conditions are considered as emitting demand for messages to the Local Broker, despite there being no active consumers on those destinations.</span> </p> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">&nbsp;</span> </p> 
<table class="diff-macro diff-block-target diff-block-context" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">language</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">title</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse"><span class="diff-html-removed" id="removed-diff-68" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">Local </span><span class="diff-html-added" id="added-diff-67" style="font-size: 100%; background-color: #ddfade;">Remote </span>Broker</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;beans xmlns="http://activemq.org/config/1.0"&gt;

  &lt;broker name="<span class="diff-html-removed" id="removed-diff-69" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">broker1</span><span class="diff-html-added" id="added-diff-68" style="font-size: 100%; background-color: #ddfade;">remoteBroker</span>" useVirtualDestSubs="true" useVirtualDestSubsOnCreation="true"&gt;  
     .....
  &lt;/broker&gt;

&lt;/beans&gt;</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0">With this configuration, when the <span class="diff-html-removed" id="removed-diff-70" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">Queue&nbsp;include</span><span class="diff-html-added" id="added-diff-69" style="font-size: 100%; background-color: #ddfade;">queue&nbsp;</span><code style="font-family: monospace"><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">include</span><span class="diff-html-changed" id="changed-diff-23" style="background-color: #d6f0ff;">.</span></code><span class="diff-html-removed" id="removed-diff-71" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">test.</span><code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-24" style="background-color: #d6f0ff;">bar.forward</span></code> is created, a Virtual Destination consumer advisory will be sent to the <span class="diff-html-removed" id="removed-diff-72" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">local broker </span><span class="diff-html-added" id="added-diff-70" style="font-size: 100%; background-color: #ddfade;">Local Broker </span>so that it knows to forward messages based on the existence of the <span class="diff-html-removed" id="removed-diff-73" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">CompositeTopic and Queue existing</span><span class="diff-html-added" id="added-diff-71" style="font-size: 100%; background-color: #ddfade;">Composite Topic that forwards to a queue</span>.</p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <h4 id="NetworksofBrokers-CompositeDestinationconsumersandVirtualTopics" class="diff-block-target diff-block-context" style="margin: 10px 0 0 0; font-size: 14px; line-height: 20px; margin: 20px 0 0 0"> <span class="diff-html-added" id="added-diff-72" style="font-size: 100%; background-color: #ddfade;">Composite </span><span class="diff-html-changed" id="changed-diff-25" style="background-color: #d6f0ff;">Destination consumers and Virtual Topics&nbsp;</span> </h4> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0">The above examples show how to configure a Composite <span class="diff-html-removed" id="removed-diff-75" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">destination </span><span class="diff-html-added" id="added-diff-73" style="font-size: 100%; background-color: #ddfade;">Destination </span>but a Virtual Topic will also work. &nbsp;In the example below, a consumer on a <span class="diff-html-removed" id="removed-diff-76" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">Queue </span><span class="diff-html-added" id="added-diff-74" style="font-size: 100%; background-color: #ddfade;">queue </span>for a Virtual Topic <span class="diff-html-added" id="added-diff-75" style="font-size: 100%; background-color: #ddfade;">on the Remote Broker </span>will now cause demand and messages will be sent across a network <span class="diff-html-added" id="added-diff-76" style="font-size: 100%; background-color: #ddfade;">from the Local Broker</span>.</p> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <span class="diff-html-removed" id="removed-diff-77" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">&nbsp;</span> </p> 
<table class="diff-macro diff-block-context" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">language</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">title</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">Local Broker</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;networkConnector uri="static:(tcp://host)"&gt;
  &lt;dynamicallyIncludedDestinations&gt;
    &lt;topic physicalName="VirtualTopic.&gt;"/&gt;
  &lt;/dynamicallyIncludedDestinations&gt;
&lt;/networkConnector&gt;</pre> </td> 
</tr> 
</tbody> 
</table> 
<table class="diff-macro diff-block-target" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">language</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">title</td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">Remote Broker</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;beans xmlns="http://activemq.org/config/1.0"&gt;

  &lt;broker name="<span class="diff-html-removed" id="removed-diff-78" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">broker1</span><span class="diff-html-added" id="added-diff-77" style="font-size: 100%; background-color: #ddfade;">remoteBroker</span>" useVirtualDestSubs="true" &gt;  
     .....
  &lt;/broker&gt;

&lt;/beans&gt;</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <p class="diff-block-target" style="margin: 10px 0 0 0">It is possible to have more than one network connector between two brokers. Each network connector uses one underlying transport connection, so you may wish to do this to increase throughput, or have a more flexible configuration.</p> <p class="diff-block-context" style="margin: 10px 0 0 0"> <br> For example, if using distributed queues, you may wish to have equivalent weighting to queue receivers across the network, but only when the receivers are active - e.g.</p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <p class="diff-block-target" style="margin: 10px 0 0 0"> <strong>N.B.</strong> You can only use <a href="/confluence/pages/viewpage.action?pageId=35973" style="color: #3b73af; text-decoration: none">wildcards</a> in the <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-27" style="background-color: #d6f0ff;">excludedDestinations</span></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>and <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-28" style="background-color: #d6f0ff;">dynamicallyIncludedDestinations</span></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>properties.<br> <strong>N.B.</strong> <strong>Do not</strong> change the name of the bridge or the name of the Broker if you are using durable topic subscribers across the network. Internally <span class="diff-html-removed" id="removed-diff-79" style="font-size: 100%; background-color: #ffe7e7; text-decoration: line-through;">ActiceMQ </span><span class="diff-html-added" id="added-diff-78" style="font-size: 100%; background-color: #ddfade;">ActiveMQ </span>uses the network name and broker name to build a unique but repeatable durable subscriber name for the network.</p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0; margin-top: 0">...</p> <p class="diff-block-target" style="margin: 10px 0 0 0">By default, it is not permissible for a message to be replayed back to the broker from which it came. This ensures that messages do not loop when duplex or by directional network connectors are configured. Occasionally it is desirable to allow replay for queues. Consider a scenario where a bidirectional bridge exists between a broker pair. Producers and Consumers get to randomly choose a broker using the failover transport. If one broker is restarted for maintenance, messages accumulated on that broker, that crossed the network bridge, will not be available to consumers till they reconnect to the broker. One solution to this problem is to force a client reconnect using <a href="http://activemq.apache.org/failover-transport-reference.html#FailoverTransportReference-BrokersideOptionsforFailover" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">rebalanceClusterClients</a>. Another, is to allow replay of messages back to the origin as there is no local consumer on that broker.<br> There is a destination policy that allows this behavior for queues by configuring a <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-29" style="background-color: #d6f0ff;">conditionalNetworkBridgeFilterFactory</span></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>with <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-30" style="background-color: #d6f0ff;">replayWhenNoConsumers=true</span></code>. The <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-31" style="background-color: #d6f0ff;">conditionalNetworkBridgeFilterFactory</span></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>provides an optional <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-32" style="background-color: #d6f0ff;">replayDelay</span></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>based on the broker-in time.</p> 
<table class="diff-macro diff-block-context" style="background-color: #f0f0f0;border: 1px solid #dddddd;margin: 10px 1px;padding: 0 2px 2px;width: 100%;; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<thead> 
<tr> 
<th class="diff-macro-title" style="background-color: transparent; text-align: left; font-weight: normal;padding: 5px;"><span class="icon macro-placeholder-icon" style="background-color: ;line-height: 20px;"><img src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/plugins/servlet/confluence/placeholder/macro-icon?name=code" style="padding-right: 5px; vertical-align: text-bottom;"> </span>Code Block</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td class="diff-macro-properties" style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;padding: 0; border: 1px solid #dddddd;; padding: 0px; border-collapse: collapse"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse"></td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
<tr> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse"></td> 
<td style="background-color: #fafafa; padding: 0 0 0 5px; font-size: 12px; text-align: left;; padding: 0px; border-collapse: collapse">xml</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
<tbody> 
<tr> 
<td class="diff-macro-body" style="background-color: #fff;border: 1px solid #dddddd;padding: 10px;; padding: 0px; border-collapse: collapse"> <pre style="margin: 10px 0 0 0; margin-top: 0">    &lt;destinationPolicy&gt;
      &lt;policyMap&gt;
        &lt;policyEntries&gt;
          &lt;policyEntry queue="TEST.&gt;" enableAudit="false"&gt;
            &lt;networkBridgeFilterFactory&gt;
             &nbsp;&lt;conditionalNetworkBridgeFilterFactory replayWhenNoConsumers="true"/&gt;
            &lt;/networkBridgeFilterFactory&gt;
          &lt;/policyEntry&gt;
        &lt;/policyEntries&gt;
      &lt;/policyMap&gt;
    &lt;/destinationPolicy&gt;</pre> </td> 
</tr> 
</tbody> 
</table> <p class="diff-block-target" style="margin: 10px 0 0 0"> <strong>N.B.:</strong> When using <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-33" style="background-color: #d6f0ff;">replayWhenNoConsumers=true</span></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>for versions &lt; 5.9, it is necessary to also disable the cursors duplicate detection using <code style="font-family: monospace"><strong><span class="diff-html-changed" id="changed-diff-34" style="background-color: #d6f0ff;">enableAudit=false</span></strong></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>as the cursor could mark the replayed messages as duplicates (depending on the time window between playing and replaying these messages over the network bridge). The problem is fully explained in this <a href="http://tmielke.blogspot.de/2012/03/i-have-messages-on-queue-but-they-dont.html" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">blog post</a>.</p> <h4 id="NetworksofBrokers-Throttlinganetworkconsumer" class="diff-block-context" style="margin: 10px 0 0 0; font-size: 14px; line-height: 20px; margin: 20px 0 0 0">Throttling a network consumer</h4> <p class="diff-block-target" style="margin: 10px 0 0 0">The <code style="font-family: monospace"><span class="diff-html-changed" id="changed-diff-35" style="background-color: #d6f0ff;">conditionalNetworkBridgeFilterFactory</span></code><span class="diff-html-changed" style="background-color: #d6f0ff;"> </span>factory allows a rate limit to be specified for a destination, such that network consumer can be throttled. Prefetch for a network consumer is largely negated by the fact that a network consumer relays a message typically acks very quickly so even with a low prefetch and decreased priority a network consumer can starve a modestly quick local consumer. Throttling provides a remedy for this.</p> </td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td class="email-content-main mobile-expand action-padding last-row-padding" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 15px 16px; background-color: #fff; padding-bottom: 10px; padding-bottom: 10px"> 
<table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
<tbody> 
<tr> 
<td id="actions-pattern-container" valign="middle" style="padding: 0px; border-collapse: collapse; padding: 15px 0 0 24px; vertical-align: middle"> 
<table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0px; vertical-align: middle"><a href="https://cwiki.apache.org/confluence/display/ACTIVEMQ/Networks+of+Brokers?src=mail&amp;src.mail.timestamp=1449660481701&amp;src.mail.notification=com.atlassian.confluence.plugins.confluence-content-notifications-plugin%3Apage-edited-notification&amp;src.mail.recipient=8aa980874e36a1eb014e36a2a6263ca9&amp;src.mail.action=view" title="View page Icon" style="color: #3b73af; text-decoration: none"><img class="actions-pattern-action-icon-image" height="16" width="16" border="0" title="View page Icon" src="cid:com.atlassian.confluence.plugins.confluence-email-resources%3Aview-page-email-adg-footer-item%3Aicon" alt="View page Icon" style="vertical-align: middle"></a></td>
<td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px; white-space: nowrap"><a href="https://cwiki.apache.org/confluence/display/ACTIVEMQ/Networks+of+Brokers?src=mail&amp;src.mail.timestamp=1449660481701&amp;src.mail.notification=com.atlassian.confluence.plugins.confluence-content-notifications-plugin%3Apage-edited-notification&amp;src.mail.recipient=8aa980874e36a1eb014e36a2a6263ca9&amp;src.mail.action=view" title="View page" style="color: #3b73af; text-decoration: none">View page</a></td>
<td class="actions-pattern-action-bull" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; color: #999; padding: 0 5px">•</td> 
</tr> 
</tbody> 
</table> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0px; vertical-align: middle"><a href="https://cwiki.apache.org/confluence/plugins/likes/like.action?contentId=36157&amp;src=mail&amp;src.mail.timestamp=1449660481701&amp;src.mail.notification=com.atlassian.confluence.plugins.confluence-content-notifications-plugin%3Apage-edited-notification&amp;src.mail.recipient=8aa980874e36a1eb014e36a2a6263ca9&amp;src.mail.action=like" title="Like Icon" style="color: #3b73af; text-decoration: none"><img class="actions-pattern-action-icon-image" height="16" width="16" border="0" title="Like Icon" src="cid:com.atlassian.confluence.plugins.confluence-like%3Aview-email-adg-content-item%3Aicon" alt="Like Icon" style="vertical-align: middle"></a></td>
<td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px; white-space: nowrap"><a href="https://cwiki.apache.org/confluence/plugins/likes/like.action?contentId=36157&amp;src=mail&amp;src.mail.timestamp=1449660481701&amp;src.mail.notification=com.atlassian.confluence.plugins.confluence-content-notifications-plugin%3Apage-edited-notification&amp;src.mail.recipient=8aa980874e36a1eb014e36a2a6263ca9&amp;src.mail.action=like" title="Like" style="color: #3b73af; text-decoration: none">Like</a></td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td class="email-content-rounded-bottom mobile-expand" style="padding: 0px; border-collapse: collapse; color: #fff; height: 5px; line-height: 5px; padding: 0 15px 0 16px; background-color: #fff; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; border-top: 0; border-left: 1px solid #ccc; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; mso-line-height-rule: exactly">&nbsp;</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td id="footer-pattern" style="padding: 0px; border-collapse: collapse; padding: 12px 20px"> 
<table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td id="footer-pattern-links-container" width="100%" style="padding: 0px; border-collapse: collapse; color: #999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
<table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
<tbody> 
<tr> 
<td class="footer-pattern-links mobile-resize-text" style="padding: 0px; border-collapse: collapse"><a href="https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=ACTIVEMQ&amp;src=mail&amp;src.mail.timestamp=1449660481701&amp;src.mail.notification=com.atlassian.confluence.plugins.confluence-content-notifications-plugin%3Apage-edited-notification&amp;src.mail.recipient=8aa980874e36a1eb014e36a2a6263ca9&amp;src.mail.action=stop-watching" title="" style="color: #3b73af; text-decoration: none">Stop watching space</a></td>
<td class="footer-pattern-links-bull" style="padding: 0px; border-collapse: collapse; padding: 0 5px; color: #999">•</td> 
</tr> 
</tbody> 
</table> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
<tbody> 
<tr> 
<td class="footer-pattern-links mobile-resize-text" style="padding: 0px; border-collapse: collapse"><a href="https://cwiki.apache.org/confluence/users/editmyemailsettings.action?src=mail&amp;src.mail.timestamp=1449660481701&amp;src.mail.notification=com.atlassian.confluence.plugins.confluence-content-notifications-plugin%3Apage-edited-notification&amp;src.mail.recipient=8aa980874e36a1eb014e36a2a6263ca9&amp;src.mail.action=manage" title="" style="color: #3b73af; text-decoration: none">Manage notifications</a></td> 
</tr> 
</tbody> 
</table> </td>
<td id="footer-pattern-logo-desktop-container" rowspan="2" valign="top" style="padding: 0px; border-collapse: collapse; padding-left: 20px; vertical-align: top"> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td id="footer-pattern-logo-desktop-padding" style="padding: 0px; border-collapse: collapse; padding-top: 3px"><img id="footer-pattern-logo-desktop" src="cid:footer-desktop-logo" alt="Confluence logo big" title="Confluence logo big" width="132" height="20" class="image_fix"></td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0px; border-collapse: collapse; color: #999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px; display: none">This message was sent by Atlassian Confluence 5.8.4<br> <img id="footer-pattern-logo-mobile" src="cid:footer-mobile-logo" alt="" title="" width="0" height="0" style="display: none; mso-hide: all"></td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
</table> 
<table id="sealed-section" border="0" cellpadding="0" cellspacing="0" width="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; display: none"> 
<tbody> 
<tr> 
<td style="padding: 0px; border-collapse: collapse; border: 0; font-size: 0px; line-height: 0; mso-line-height-rule: exactly"></td> 
</tr> 
</tbody> 
</table>
</body>
</html>
Mime
View raw message