activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: Can I make createQueue on embedded broker session create a queue on the remote broker as well?
Date Thu, 18 Jun 2015 12:59:32 GMT
Have you set up your dynamically included destinations as described by the
"dynamic networks" section of
http://activemq.apache.org/networks-of-brokers.html?

Note that under that setup, messages will be forwarded to the standalone
remote broker only if there is a currently-attached consumer on the remote
broker; if there is no consumer, messages will stay on whichever broker
they were first sent to.  If that's not acceptable, the normal solution is
to use statically included destinations (see the "pure static networks"
section just below), but as far as I know there's no way to use wildcards
so you'd have to list them all in advance.

Tim
On Jun 18, 2015 6:05 AM, "pubudu gunawardena" <pubudupg@gmail.com> wrote:

> To elaborate more, I am using an embedded broker to gain the benefits
> mentioned at
> http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html
> .
> But I want to dynamically create queues without knowing the name
> beforehand.
>
> On Thu, Jun 18, 2015 at 5:32 PM, pubudu gunawardena <pubudupg@gmail.com>
> wrote:
> > Hi All,
> >
> > I am quite new to ActiveMQ and am trying to figure out a solution to
> > the following.
> >
> > I have an embedded broker and a remote broker.
> > From my code I do the following to create a session on the embedded
> > broker and to create a queue there.
> >
> >             factory = new
> ActiveMQConnectionFactory("tcp://localhost:61617");
> >             connection = factory.createConnection();
> >             connection.start();
> >             session = connection.createSession(false,
> Session.AUTO_ACKNOWLEDGE);
> >             destination = session.createQueue("SAMPLEQUEUE");
> >
> > I want a queue with the same name to be created on the remote broker
> > when I do that and any messages I send to that queue on the embedded
> > broker to go to the remote broker.
> >
> > I have looked at the the documentation on JMS to JMS Bridge mentioned
> > at http://activemq.apache.org/jms-to-jms-bridge.html but it seems that
> > I have to know the queue name beforehand in order to create a
> > OutboundQueueBridge.
> >
> > Is there any way that I can  dynamically create the queue on the
> > remote broker when I call the createConnection as I have mentioned
> > above? Is there any configuration in the JMS to JMS bridge which
> > enables that?
> > --
> > Thanks,
> > Pubudu
>
>
>
> --
> Thanks,
> Pubudu
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message