activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <>
Subject Re: Multiple subscriptions to different Topics freezes application
Date Mon, 21 Feb 2011 16:28:02 GMT
On Mon, 2011-02-21 at 08:22 -0800, Grqhf wrote:
> Hello everyone,
> I have an application which tries to subscribes to a lot of different
> topics.
> The server side publishes a lot of messages through these topics and as soon
> as the application starts subscribing, it receives so many messages that the
> application cannot even reach the end of the subscription function.
> It seems that the OnMessage Listener is flooded so much (the listener is the
> class which is trying to subscribe itself ot all the topics).
> So basically is there a way to stop the reception of messages until I have
> subscribed to all of the topics? Or am I missing something there?
> The thread trying to subsscribe to all of the topics never get the processor
> again.
> (If the server is down, the subscription is fine since it does not receive
> anything so it does not lose the processing power..)
> Thank you in advance.
> Paul.

You should hold off on calling connection.start() until you have wired
up all your subscriptions, then you can call connection.start() and they
will start receiving messages.


Tim Bish
Twitter: tabish121

View raw message