So, that request-response recipe uses temporary destinations to route messages. Your use-case is that of request-throttling and load-balancing the 'service'. Why not use something designed for that purpose like nginx and its http_limit_conn module? ActiveMQ does have the producer flow-control feature but that throttles based off of resource utilization (see: http://activemq.apache.org/producer-flow-control.html).
On Mon, Aug 20, 2012 at 2:57 PM, zackhasit <zackha...@gmail.com> wrote: > Thanks a lot for the code. I looked at it but if you can provide some > comments it might help as I am only familiar with whats at > > http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html > and not inner workings. > > But first question that comes to mind is if HTTP is right protocol. For > regular communication (with one broker) does it use same HTTP protocol or > its something more light weight (openwire / stomp )? Shoudl we use that ? > (Maybe I dont understand what you are doing and thats the confusion...) > > Secondly, is this only way to communicate with multiple brokers. I looked > at > the code here > ( > http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html > ) > Based on this code cant I just set up combine client and server code in one > process and run it as : > > public static void main(String[] args) { > new Server(); > new client(); > } > > In doing so I can have different values for variable "messageBrokerUrl = > "tcp://localhost:61616";" for client and server. Such that when client > sends > requests it sends to one broker connection in client class defined in code > and server class implements onMessage() function to receive from different > connection ? Is something like that possible (more standard implementation) > ? > > > >>messaging service/broker as a sort of rate-control/throttling mechanism > between client-server? > Yes (and load balancing where 3 consumers for 1 producer....). > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Implementing-Request-Response-mechanism-tp4655304p4655332.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >