You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ferez <fa...@yahoo.com> on 2019/10/16 15:23:48 UTC

Best practice for synchronouse request response with 5000 consumers

Hi

I am working on a scenario where there is a single broker (configured as
master/slave) and two types of clients, a web application (producer) which
send requests and waits for responses and about 5000 java client
applications (consumer) which receive requests and send back responses.
Every java client app creates its own queue and web application send request
for a java client to its queue and receives the response in a temp queue
(synchronous request response, as described in activemq documentation 
https://activemq.apache.org/how-should-i-implement-request-response-with-jms
<https://activemq.apache.org/how-should-i-implement-request-response-with-jms> 
)

Now I have a few questions:

1- I use a single shared connection in web application among multiple
threads as the connection object is thread safe. Is a single connection
sufficient or should I use connection pool?

2- Suppose 4 thread in web application simultaneously send request to each
java client. In this way we will have 5000 queue for requests (which is
fixed number, one for each java client) and 4 temp queue for responses,
namely 20000 temp queue. Could activemq handle this load? (this situation
will not occur but I am considering the worst case )

3- If the answer to the second question is no, what is the best practice for
this situation? Should I use a single queue for requests which all 5000 java
client subscribe to and use message selectors to dispatch each request to
appropriate java client And use temp queues for responses as before?

I am using apache-activemq-5.15.9 for broker, activemq-all-5.10.2 java
client library in web application side (I can’t upgrade it at this time),
and activemq-all-5.15.9 java client library in java clients side. 

Regards,
Ferez



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html