[rabbitmq-discuss] Net::AMQP Perl Client - Status?

Tony Garnock-Jones tonyg at lshift.net
Sun Jan 11 22:38:39 GMT 2009


Hi Darien,

Exchanges have to be declared out-of-band ahead of time (though a clean 
approach to doing the declarations via STOMP would be a great 
contribution), but Queues are declared at the point of subscription.

  1. A queue.declare is done as part of SUBSCRIBE. The boolean STOMP
     headers "passive", "durable", "exclusive" and "auto-delete" are used
     as part of the declaration. (They all default "false" except
     "auto-delete", which defaults "true".)

  2. If the "exchange" STOMP header is present, a queue.bind is done
     (using also STOMP header "routing_key").

  3. Finally, a basic.consume is done.

So, to address your second question: it has actually declared and 
started consuming from the queue! So the waiting is expected behaviour.

Regards,
   Tony

Darien Kindlund wrote:
> Hi Tony,
> 
> Great!  That answers most of my questions.... Lastly, I assume you
> still have to pre-declare all your exchanges and queues *outside* of
> Net::Stomp (through some other AMQP interface) -- correct?  I got the
> impression that if any of the exchanges or queues were torn down
> between successive executions of a Net::Stomp client, that any
> messages sent would be silently dropped.
> 
> That leads me to another question -- apparently, when subscribing to a
> non-existent queue, the Net::Stomp client does not kick back any type
> of exception.  Instead, it appears to blindly sit and wait forever,
> with no notification that the bind was unsuccessful.  I assume this is
> a known limitation, right?
> 
> Regards,
> -- Darien
> 
> On Sun, Jan 11, 2009 at 1:41 PM, Tony Garnock-Jones <tonyg at lshift.net> wrote:
>> Hi Darien,
>>
>> (CCs trimmed)
>>
>> Darien Kindlund wrote:
>>> Additionally, I was curious if the STOMP adapter provides a way for a
>>> Net::Stomp perl client to connect to a different vhost (other than
>>> '/').
>> Yes: supply a custom header, "virtual-host", to the CONNECT command. I'm not
>> 100% certain, but I suspect you can do this by
>>
>>  $stomp->connect({login=>'guest', passcode=>'guest',
>>                   "virtual-host"=>'/my-virtual-host'})
>>
>> There are a couple of other extension headers available; I'm afraid I
>> haven't gotten around to the dreaded documentation yet, so reading
>> rabbit_stomp.erl is the only way to discover them. A quick grep provides:
>>
>>  CONNECT virtual-host
>>  CONNECT realm
>>  SEND exchange
>>  SUBSCRIBE exchange
>>  SUBSCRIBE routing_key
>>  various message properties in SEND
>>  queue and binding attributes in various methods
>>    (X-, X-Q-, X-B- prefixes)
>>
>> Regards,
>>  Tony
>>




More information about the rabbitmq-discuss mailing list