You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Roland Thomas Lichti <ro...@telefonica.de> on 2009/04/21 12:05:21 UTC

Network of brokers and listener with selectors

Hi,

we just switched over from a JDBC-based failover configuration to a
network of brokers and now have the following situation:

1. we have two active brokers (that's fine).
2. we have MDBs that listen on one broker and get all messages
regardless of the broker where the message has been produced (that's
fine, too).

3. we have a dynamic listener (from a java servlet) that uses a selector
to wait for a specific answer. But the answer often lies around "on the
other broker" (the broker where the servlet is not connected to).

In case 3 there are multiple listeners (and listeners on both brokers).
But only one listener accepts a specific message due to the selector on
the listener. Is there a way to get the selector communicated between
the brokers so that the message will change be transfered to the right
broker?

Our configs are the same on both broker (see attachment).

I'm very new to administering ActiveMQ (I have been developer but got
assigned the duty of administering our broker system, too), so there may
be a big mistake in the configuration.

bye,
    Roland

-- 
Roland Thomas Lichti
IT
Telefónica Deutschland GmbH
Hülshorstweg 30, D-33415 Verl
Tel +49(0)5246-80-1121
Mobil +49(0)160-98949570
Fax +49(0)5246-80-2121
Roland.Lichti@telefonica.de

Telefónica Deutschland GmbH || Georg-Brauchle-Ring 23-25 || 80992 München || www.telefonica.de
Telefon: 05246 80-1080 || Fax: 05246 80-2080  || E-Mail: info@telefonica.de
Ust.-Id.-Nr. DE 167 388 434 || Amtsgericht München HRB 108 006
Geschäftsführer: Johannes Pruchnow, Dr. Dirk Schmelzer, Michael Fränkle
Bankverbindung: Konto 158 09 76 || BLZ 478 400 65 || Commerzbank Gütersloh 


Re: Network of brokers and listener with selectors

Posted by Roland Thomas Lichti <ro...@telefonica.de>.
Hi Dave,

Dave Stanley schrieb:
> How much traffic does the servlet client get - I'm wondering if perhaps your
> "dynamic" listener could be timing out.
>   
The traffic in development (where this occures) is quite low. A few
messages (50 to 100) per minute. BUT the servlet sends the request via
JMS to a backend which sends the answer (normally within 2-5 seconds)
back to the servlet. The servlet waits for 4 minutes.

The problem only exists when using two brokers as active-active-cluster
- and the listener connects to another broker than the answering
backend. Normally there are more than one listener listening on the
queue - but since every listener only checks for exactely one message
(using the selector) it is important that that message is routed to the
correct node. I understood that with the configuration
"conduitSubscription=false" the selectors get transfered between the
brokers and therefore this system can be used.
> It might be worth trying to change the broker url you use to connect the
> dynamic client to the broker to something like:
> tcp://localhost:61616?wireFormat.maxInactivityDuration=0
>   
On development (where we see this phenomenon) there is an inactivitity
of less than 5 to 10 seconds. On production that may be more (the
answers take there up to 2 minutes). Is the timeout of 5 to 10 seconds
really a problem? I'll check it.
> Do you see any errors or warnings in any of the logs?
>   
I did not see any warnings or errors, wether on JBoss nor on ActiveMQ side.

The problem is, that the listeners are listening and waiting - but on
the wrong broker. And the brokers don't shift the message to the right
broker.

bye,
    Roland

PS: sorry, I forgot to mention the version: we are using ActiveMQ 5.2.0
with the activemq-rar on JBoss-side (connect URL:
"failover://(jms1.dev:61616,jms2.dev:61616)?initialReconnectDelay=1000")

-- 
Roland Thomas Lichti
IT
Telefónica Deutschland GmbH
Hülshorstweg 30, D-33415 Verl
Tel +49(0)5246-80-1121
Mobil +49(0)160-98949570
Fax +49(0)5246-80-2121
Roland.Lichti@telefonica.de

Telefónica Deutschland GmbH || Georg-Brauchle-Ring 23-25 || 80992 München || www.telefonica.de
Telefon: 05246 80-1080 || Fax: 05246 80-2080  || E-Mail: info@telefonica.de
Ust.-Id.-Nr. DE 167 388 434 || Amtsgericht München HRB 108 006
Geschäftsführer: Johannes Pruchnow, Dr. Dirk Schmelzer, Michael Fränkle
Bankverbindung: Konto 158 09 76 || BLZ 478 400 65 || Commerzbank Gütersloh 


Re: Network of brokers and listener with selectors

Posted by Dave Stanley <ds...@gmail.com>.
Hi Roland,
How much traffic does the servlet client get - I'm wondering if perhaps your
"dynamic" listener could be timing out.

It might be worth trying to change the broker url you use to connect the
dynamic client to the broker to something like:
tcp://localhost:61616?wireFormat.maxInactivityDuration=0

Do you see any errors or warnings in any of the logs?

Regards
/Dave

On Tue, Apr 21, 2009 at 6:05 AM, Roland Thomas Lichti <
roland.lichti@telefonica.de> wrote:

> Hi,
>
> we just switched over from a JDBC-based failover configuration to a
> network of brokers and now have the following situation:
>
> 1. we have two active brokers (that's fine).
> 2. we have MDBs that listen on one broker and get all messages
> regardless of the broker where the message has been produced (that's
> fine, too).
>
> 3. we have a dynamic listener (from a java servlet) that uses a selector
> to wait for a specific answer. But the answer often lies around "on the
> other broker" (the broker where the servlet is not connected to).
>
> In case 3 there are multiple listeners (and listeners on both brokers).
> But only one listener accepts a specific message due to the selector on
> the listener. Is there a way to get the selector communicated between
> the brokers so that the message will change be transfered to the right
> broker?
>
> Our configs are the same on both broker (see attachment).
>
> I'm very new to administering ActiveMQ (I have been developer but got
> assigned the duty of administering our broker system, too), so there may
> be a big mistake in the configuration.
>
> bye,
>    Roland
>
> --
> Roland Thomas Lichti
> IT
> Telefónica Deutschland GmbH
> Hülshorstweg 30, D-33415 Verl
> Tel +49(0)5246-80-1121
> Mobil +49(0)160-98949570
> Fax +49(0)5246-80-2121
> Roland.Lichti@telefonica.de
>
> Telefónica Deutschland GmbH || Georg-Brauchle-Ring 23-25 || 80992 München
> || www.telefonica.de
> Telefon: 05246 80-1080 || Fax: 05246 80-2080  || E-Mail:
> info@telefonica.de
> Ust.-Id.-Nr. DE 167 388 434 || Amtsgericht München HRB 108 006
> Geschäftsführer: Johannes Pruchnow, Dr. Dirk Schmelzer, Michael Fränkle
> Bankverbindung: Konto 158 09 76 || BLZ 478 400 65 || Commerzbank Gütersloh
>
>