In NServiceBus, this is done with the distributor.

Ayende described it a while back here:
http://ayende.com/Blog/archive/2008/03/24/NServiceBus-Distributor-Review.asp
x

Shouldn't be that hard to implement if it isn't available out of the box.

-- Udi Dahan

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of crowley_mark
Sent: Tuesday, March 30, 2010 12:09 AM
To: Rhino Tools Dev
Subject: [rhino-tools-dev] ESB Consumer Scaling

I have a consumer that processes a file. The activity of the consumer
process is resource intensive; therefore I have set the bus thread
count to 1 (effectively creating a queue).

In times of load I would like to start 1 or more new instances of the
consumer on new machines. We are using Amazons EC2 infrastructure so
creating new machine instances involves minimum effort.

My question is how to utilise ESB to the best advantage in such a
scenario.

My thoughts are...

I don't think I can utilise the Publish/Subscribe functionality, as
each subscriber will just get the same message, so I will just end up
processing the same file multiple times on different machines.

As the process that sends the messages will not know of the location/
name/ip of the consumer machines, it could  just send the messages to
a predefined local queue. Having this local queue will ensure that
messages are persisted, even if no consumers are in existence (unlike
pub/sub model).

Consumers on remote machines are configured to recieve messages from
the predefined queue, and use the reply semantics to send any response
message back to the sender. Any errors are persisted back to the
queues error subqueue.

New machines that come up will just pick off the next message,
process, and reply.

When a consumer machine is dropped (load reduced), because there are
no subscribers etc. it simply disappears.

Does this make sense. I believe this is possible, is there a better
way? Any obvious disadvantages, other thoughts?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rhino-tools-dev?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to