[rabbitmq-discuss] pub-sub part 2: erlang consume

Joe Lee codewalkerjoe at gmail.com
Thu Apr 10 21:18:37 BST 2008


On Thu, Apr 10, 2008 at 6:50 AM, Ben Hood <0x6e6562 at gmail.com> wrote:

> Hi Joe,
>
> On 10 Apr 2008, at 00:17, Joe Lee wrote:
> > BasicConsume and BasicGet there is a variable named queue = Q. In
> > pub-sub case, how do you define null queue in Erlang-client? In
> > basic.consume I set the queue = <<"">> like below:
>
> Do you have a particular reason to declare a null queue?
>

Taken straight from amqp0.8.pdf file pg25.

Docs' psuedocode explanation has set queue=<empty>.  That was my reason to
declare a null queue.

Does null queue have any special functionality?


Abstract from the amqp docs:

2.1.5.3 Constructing a PubSub
Subscription Queue

Here is the pseudocode
for creating and binding the pubsub subscription queue:
Queue.Declare
    queue=<empty>
    auto_delete=TRUE
S:Queue.Declare-Ok
    queue=tmp.2
Queue.Bind
    queue=tmp.2
    TO exchange=amq.topic
    WHERE routing_key=STOCK.USD.*

To consume from the subscription queue, the consumer does this:

Basic.Consume
    queue=tmp.2

When publishing a message, the producer does something like this:

Basic.Publish
    exchange=amq.topic
    routing_key=STOCK.USD.IBM


>
> Maybe you can tell us what you are trying to achieve.
>

I just want to do simple publish a message and then consume the message.

Thank you,
Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080410/21b89532/attachment.htm 


More information about the rabbitmq-discuss mailing list