Closed abraxxa closed 7 years ago
I thought it did to be honest, let me check.
https://github.com/retupmoca/P6-Net-AMQP/commit/639361d1c07efff93756aa374b44bc1bfc196fca should have implemented it (and it is tested for,) so you will need to supply some code that doesn't work as expected.
Calling declare-queue fails for me with an invalid number of arguments error. It seems passing an empty string works but I'd prefer passing none ninstead.
A patch to make declare-queue
a multi with samewith("") would work fine, I'll take a peek at some point.
Thanks! Is a multi-sub really required to allow undef and ''?
well, an alternative would be to provide the method with a default of "" for the name. I prefer multis :)
This is out in the v0.1.5 sorry it took so long, I forgot about it :)
The longer syntax where you can supply passive and durable still doesn't allow passing of an undefined name, '' works as a workaround.
Are you sure? I've just added a test that does $channel.declare-queue(:durable, :exclusive)
and it works fine. You'll probably want to make sure you've got the latest version (which is 0.1.9 now)/
I've used the following syntax:
my $q = $channel.declare-queue(
'',
passive => False,
durable => False,
exclusive => True,
auto-delete => True,
).result;
You shouldn't need to do that $channel.declare-queue(:exclusive, :auto-delete)
should work fine.
As neither a type nor a default value is specified in the method signature I wasn't sure what they will end up with.
So the AMQP broker generates a queue name. That's useful for non-durable, auto-delete queues. In that case Net::AMQP::Queue should fetch the generated name after a successful declare and populate its name attribute with the broker assigned name.