[rabbitmq-discuss] FW: Multiple consumers
Ben Hood
0x6e6562 at gmail.com
Sat Jul 21 20:30:23 BST 2007
Matthias,
> > >>* The channel processes appear to be pointing to the same
> > >>process for both reader and writer. That is useful for the
> > >>common case of RPC-style interactions but you also need to
> > >>support a subscription model along the lines of the Consumer
> > >>classes in the Java client.
Whilst trying to get the channel to send messages to a callback
handler for the subscription model, I've found that I need to set the
writer pid in the channel to the pid of the client to do the protocol
handling (the RPC-style interaction), but in order to get subscription
working I'm going to have to either
a) pass the Pid of a subscriber into the channel
b) have subscription events get sent back to the client process, which
then in turn can forward them on to a subscriber.
As far as I can tell, option (b) will be less intrusive into the
current server implementation at a cost of turning the client into a
pure data shovel for subscription events. If this overhead were
negligible, I would run with it, because it means that the channel
code can remain the same. Also, this is inline with what the java
client does, because it handles data from the socket, deframes it and
hands it off to a worker thread. Furthermore, I feel it is also more
inline with the protocol flow. What do think about taking approach
(b)?
Ben
More information about the rabbitmq-discuss
mailing list