[rabbitmq-discuss] FW: Multiple consumers

Ben Hood 0x6e6562 at gmail.com
Sun Jul 22 23:52:57 BST 2007


Matthias,

> > So I don't see where the short-circuit route comes into play in the
> > networked case, only in the non-networked case where you can utilize
> > erlang message passing.
>
> Correct. Nothing I said was meant to indicate otherwise.

OK, based on this discussion here's the latest patch.

The additions since the last one are implementations for

-queue_declare/3
-exchange_declare/8
-queue_bind/5
-basic_publish/6
-basic_consume/4

I've included a test for the client and a consumer for the basic
consume registration, which uses the gen_event behaviour.

I've also tested this in conjunction with the Java client, and the
initial tests seem to pass.

I had been looking at implementing the short circuit we've discussed
by sending the subscriber's pid as the consumerTag field in the basic
consume properties, but I thought that would pollute the basic_consume
method in rabbit_amqqueue because you would do do a list_to_pid
conversion of the consumerTag field and if any other non-erlang client
were set consumer tags that just happend to match erlang's Pid
notation, this would break.

So I opted to handle the reception of a consumer pid as an extra field
in the mainloop_without_framing/1 function in the channel.

So if this approach for subscriptions is ok, I will go ahead and
complete the protocol for the native client.

Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erlang_client_2.patch
Type: application/octet-stream
Size: 28685 bytes
Desc: not available
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20070722/0b688558/attachment.obj 


More information about the rabbitmq-discuss mailing list