activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene Dzhurinsky <>
Subject Re: Message announcement and routing
Date Tue, 26 Aug 2008 08:35:37 GMT
On Tue, Aug 26, 2008 at 09:17:09AM +0100, James Strachan wrote:
> How many commands and sets of messages are required? Only normally
> with the the worker pattern you send all the required commands to be
> executed by a consumer in a single message.

In fact the consumer may issue various commands depending on results returned
by the worker and user input, so it is not possible to use batch of commands.

> While supporting many messages is possible - its just way more chatty
> and complex; requiring dealing with partial failure and so forth.

We don't need to solve the task when the worker consumer going down during the
processing of intermediate commands, so we just presume the consumer will be
alive from getting the initial command to finishing the processing after the
client is satisfied with results.

> If you want reliability, you should use message acknowledgement or
> transactions so the broker can failover to other clients if the
> consumer fails to process the message. But if you are sending many
> messages in a stateful conversation, you're gonna have to implement
> your own failover protocol as you're gonna have to restart the
> conversation and reply all the messages to another consumer if you get
> a failure.

It's a good point, however this isn't the case we are worrying about for now,
we are just trying to prove the concept. If the consumer did not send the
acknowledgement, will the broker not route another messages to that consumer?

> The easiest solution is to use a single request message and single
> response message; then failover and reliability are trivial and
> ActiveMQ can do all that for you.

Unfortunately, we can't encapsulate whole bunch of commands into the single
message, because it is not predictable of which commands will be issued by the
client (this depends on user input).

Eugene N Dzhurinsky

View raw message