[rabbitmq-discuss] FW: Multiple consumers

Matthias Radestock matthias at lshift.net
Sun Jul 22 08:04:03 BST 2007


Ben,

"Ben Hood" <0x6e6562 at gmail.com> writes:

> Option (a) could make use of the fact that as an erlang process, the
> server channel could directly send an event to a consumer process,
> thus bypassing the client process as follows:
>
> client                       server
>
> reader 1..n  <-----  writer 1..n

The most direct route actually looks more like this:

rpc:
caller --> channel
caller <-- channel

message to subscriber:
consumer <-- channel <-- queue

Here the channel plays the role of the client channel, server channel,
and server writer.

That is reasonably challenging to implement. OTOH it will probably force
the kind of abstractions that would be good to have in any case.

> So the question I was trying to ask was: Does this direct dispatch
> gain you anything?

In the networked case we need to add quite a few actors:

rpc:
caller --> c_channel --> c_writer --> s_reader --> s_channel
caller <-- c_channel <-- c_reader <-- s_writer <-- s_channel

message to subscriber:
consumer <-- c_channel <-- c_reader <-- s_writer <-- queue

I reckon the short-circuit route is worthwhile since it simplifies (and
as a result speeds up) things considerably -- If we are going to have a
direct client at all, we might as well go the most direct route.


Matthias.




More information about the rabbitmq-discuss mailing list