Use two simplex connections, and only set staticallyIncludedDestinations on
the hub side.  Then messages will go to the hub and stay there, until
consumers connect to the hub to consume them.  If instead they'll be
connecting to spoke brokers, then you need to read the Stuck Messages
section of the page Chris linked to in order to allow a message to go back
to a broker it's already been to.  Also, you'll probably want a much higher
TTL value, because you may end up with circuitous message routing.

Tim
On May 11, 2016 11:20 AM, "Christopher Shannon" <
christopher.l.shan...@gmail.com> wrote:

> A consumer will be registered for each end of the network connector (that's
> how the messages are received by the brokers).
>
> If staticallyIncludedDestinations are used then messages will always be
> send to the remote brokers even if there are no registered consumers.  If
> you use dynamicalyIncludedDestinations then the messages will only be sent
> if a consumer exists on the remote broker.  Take a look at the the config
> options here for more info:
> http://activemq.apache.org/networks-of-brokers.html
>
> On Wed, May 11, 2016 at 11:07 AM, exabrial <exabr...@gmail.com> wrote:
>
> > I'm creating a hub-spoke network of brokers. I'd like the edge brokers to
> > forward their messages to the hub so I don't have a ton of small backing
> > stores of messages hanging around.
> >
> > So on the "spoke" broker, I have this network connector:
> >
> >       <networkConnectors>
> >          <networkConnector
> >             name="tomee1_outbound_nc"
> >             duplex="true"
> >             networkTTL="2"
> >             uri="static:(tcp://localhost:61616)">
> >             <staticallyIncludedDestinations>
> >                <queue name=">" />
> >             </staticallyIncludedDestinations>
> >          </networkConnector>
> >       </networkConnectors>
> >
> > When I connect it to the hub and log into the hub's admin console, it
> shows
> > a consumer has also been created. If I attach another spoke to the hub,
> the
> > message from the first spoke will get forwarded to the new spoke even
> > though
> > no consumers have registered demand, and even odder yet, the hub shows
> that
> > two consumers now exist on the network.
> >
> >
> > I'm guessing that I'm misunderstanding how staticallyIncludedDestinations
> > works. Is there a way to forward the messages to the hub when it's
> > available, but store them locally if it's not?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/Why-does-having-a-staticallyIncludedDestination-create-a-consumer-tp4711832.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>

Reply via email to