activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pubudu gunawardena <pubud...@gmail.com>
Subject Re: Can I make createQueue on embedded broker session create a queue on the remote broker as well?
Date Fri, 19 Jun 2015 04:21:20 GMT
Thanks for the information Tim. I tried 'dynamic networks' setup and
the queues are getting created. One thing that I would like to know
is, when should the JMS to JMS connection be used and when should the
Network connection be used? Is there any other difference when using
the dynamic network setup (other than messages not being sent until a
consumer is available)?

On Thu, Jun 18, 2015 at 6:29 PM, Tim Bain <tbain@alumni.duke.edu> wrote:
> 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
>>



-- 
Thanks,
Pubudu

Mime
View raw message