You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by James Strachan <ja...@gmail.com> on 2007/09/04 08:43:05 UTC

Re: Temp queue vs topic via message selector?

On 8/31/07, TOPPER_HARLEY <TR...@ericsson.com> wrote:
>
> Hi all,
> We are currently using temp queues for dispatching data to a number of
> clients. In this way each client gets only his own data, request response
> style. However we are having lots of trouble with the temp queues and the
> broker blocking.

Could you describe what this problem is & how to reproduce? What
version are you using? Are you hitting RAM exhaustion?
http://activemq.apache.org/my-producer-blocks.html

> We also have topics to dispatch updates to all clients,
> which are working well. Instead of a temp quueue for each client, we are
> considering using just one permanent topic onto which we would send all
> client response data, with each client using a unique message selector to
> only get his data. What do ye think of this approach, does it make any
> sense?

If clients come and go and their messages are meant to be discarded
when a client disappears then temporary queues are really exactly what
you need. Also lots of clients on a single topic with selectors is
much less efficient than using temporary queues. But either should
work in theory.


> We are worried that the throughput could drop off with all data being
> published onto the one destination rather than distributed across many(would
> each clients interfere its each others throughput), but we are hoping our
> blocking issues would be solved.
>
> Any opinions or pointer would be appreciated

I'd recommend getting temporary queues to work; as it scales better &
offers the big feature, that client-specific messages are trashed as
soon as clients disconnect.  There could maybe be performance issues
with the single-topic approach with 'slow consumers'; particularly if
its the same producer sending to all the clients. (e.g. 1 client being
slow could potentially block messages for other clients using the
single topic option).

-- 
James
-------
http://macstrac.blogspot.com/

Re: Temp queue vs topic via message selector?

Posted by TOPPER_HARLEY <TR...@ERICSSON.COM>.
Hi James,
Could you describe what this problem is & how to reproduce? What
version are you using? Are you hitting RAM exhaustion?
http://activemq.apache.org/my-producer-blocks.html

The issue is pretty much identical to that described here:
https://issues.apache.org/activemq/browse/AMQ-1375 AMQ-1375 

We are using AMQ 4.1.1 with embedded broker.

When we make lots of quick requests from a client on a temp queue, the
embedded broker on server side seems to block. Nothing can then be sent to
any destination and any further call to createTemporaryQueue() also blocks.
If doesn't look like a RAM issue as the MemoryPercentageUsed on the broker
is zero when it happens. We were previously having issues with RAM but we
moved to 512MB which seems to have sorted it. The trace dump has a number of
threads blocked on oneWay.wait(). 

The client only adds an anonymous Runnable to an executor so I don't see why
this should be slow, and it doesn't make the AMQ thread wait for any code to
execute. Hence I don't see how the broker gets backed up. One issue I have
is that I don't really understand how AMQ works internally so its hard to
diagnose a problem when you dont know the workings of a major component.


>If clients come and go and their messages are meant to be discarded
>when a client disappears then temporary queues are really exactly what
>you need. Also lots of clients on a single topic with selectors is
>much less efficient than using temporary queues. But either should
>work in theory.

Yes thats what I was thinking on the efficiency and we do want the messages
discarded on client shutdown.


>I'd recommend getting temporary queues to work; as it scales better &
>offers the big feature, that client-specific messages are trashed as
>soon as clients disconnect.  There could maybe be performance issues
>with the single-topic approach with 'slow consumers'; particularly if
>its the same producer sending to all the clients. (e.g. 1 client being
>slow could potentially block messages for other clients using the
>single topic option).

Yes it will be the one producer always, one client blocking is what we are
afraid off alright.

Tom
-- 
View this message in context: http://www.nabble.com/Temp-queue-vs-topic-with-message-selectors--tf4362614s2354.html#a12473104
Sent from the ActiveMQ - User mailing list archive at Nabble.com.