[rabbitmq-discuss] Error in declaring a queue.
Anton Sizov
a.sysoff at gmail.com
Tue Jul 23 08:41:27 BST 2013
What is AMQP_PASSIVE equal to? It should be false (by default) to declare
new queue and false to to check queue for existance. Try to
remove $this->queue->setFlags(AMQP_PASSIVE); line entirely. Read docs at
rabbitMQ official site for more info about queue declaration method and its
flags.
On Wednesday, July 3, 2013 9:24:13 AM UTC+3, Venky wrote:
>
> Hi All,
>
> I am trying to declare a queue in RabbitMQ with php.
>
> Here is my code
>
> function declareQueue($queue_name)
> {
> $this->queue = new AMQPQueue($this->channel); //channel is already
> created. am omitting that code from here
> $this->queue->setName($queue_name);
> $this->queue->setFlags(AMQP_DURABLE);
> $this->queue->setFlags(AMQP_PASSIVE);
> $this->queue->declare();
> }
>
> $amqp -> declareQueue("myqueue");
>
>
>
> This part of code is giving an error when there is no queue in RabbitMQ.
> the error is:
>
> PHP Fatal error: Uncaught exception 'AMQPQueueException' with message
> 'Server channel error: 404, message: NOT_FOUND - no queue 'myqueue' in
> vhost '/''
>
>
>
> Every thing is going fine when the queue is already created in Rabbitmq.
>
>
> Any help please.
>
> Thanks in advance.
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130723/d23997c4/attachment.htm>
More information about the rabbitmq-discuss
mailing list