activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Luna <j-l...@rocketmail.com>
Subject Re: Unable to have multiple consumers on the same broker
Date Tue, 14 Jul 2009 05:21:53 GMT

Are you sure you're not setting the same client-id header for both clients?  If you are, I
don't believe the second client will be allowed to connect -- you'll receive an exception
from the broker.  

On that note, do you know if you're connecting to the broker at all with the second client?
If so, what's the broker's response when you subscribe to the queue?  If you're not sure how
to check for these things, you should start by seeing how errors are handled by the PHP stomp
library, and make sure that you're handling them properly.  Next, you'll want to tail the
activemq log to see if the broker is throwing any exceptions, on *nix OSes:
$ tail -f data/activemq.log

Finally, use wireshark (or some other packet sniffing software) to see the exact traffic going
on between the client and broker.  You should capture the data in plain text (ascii).  If
you're not sure how to interpret it, you can then respond with the output so that we can have
a look. 

JLuna



----- Original Message ----
> From: kkarank <karanka4@gmail.com>
> To: users@activemq.apache.org
> Sent: Tuesday, July 14, 2009 12:40:08 AM
> Subject: Re: Unable to have multiple consumers on the same broker
> 
> 
> Ok just played around with setting the prefetch size to 50 in the URL when
> using the connect command from STOMP - still the same problem 
> 
> I am struggling to understand though as to how the prefetch size could have
> anything to do with this. Reading through the docs - this setting takes care
> of how many messages are streamed to EACH consumer - my problem is
> completely irrelevant to this fact. I am only able to set ONE consumer per
> queue.
> 
> kkarank wrote:
> > 
> > No I did not set the prefetch size - just used the defaults that come with
> > the PHP Stomp client. - I will play around and come back 
> > 
> > Thanks :)
> > 
> > bsnyder wrote:
> >> 
> >> On Mon, Jul 13, 2009 at 9:53 PM, kkarankwrote:
> >>>
> >>> Thanks Bruce,
> >>>
> >>> I am connecting to the broker from PHP Stomp library and there is
> >>> nothing in
> >>> the examples you mention that talks about how to setup multiple
> >>> consumers
> >>> listening to the same broker port but on multiple queues?
> >> 
> >> Ah, you didn't mention anything about using Stomp. Have you set the
> >> prefetch size?  See the following for more info about prefetch and
> >> prefetch with Stomp:
> >> 
> >> http://activemq.apache.org/what-is-the-prefetch-limit-for.html
> >> 
> >> http://activemq.apache.org/stomp.html#Stomp-ActiveMQextensionstoStomp
> >> 
> >> Bruce
> >> -- 
> >> perl -e 'print
> >> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E
> >> );'
> >> 
> >> ActiveMQ in Action: http://bit.ly/2je6cQ
> >> Blog: http://bruceblog.org/
> >> Twitter: http://twitter.com/brucesnyder
> >> 
> >> 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Unable-to-have-multiple-consumers-on-the-same-broker-tp24467033p24473573.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



      

Mime
View raw message