[rabbitmq-discuss] php talking to ruby

Michael Klishin michael.s.klishin at gmail.com
Wed Jan 19 13:39:04 GMT 2011


Robin,

What happens here two of your apps declare queue with different attributes
because default values for
parameters like durability seems to differ between that php library and what
amqp gem uses.

Since you only want to consume messages on the Ruby side and publish them on
the PHP side, you
have an option of only declaring one queue in your Ruby app and one exchange
in the PHP app. Then you
can use default exchange that routes messages to queues when routing key
matches queue name.

When queue is declared only in one place, differences in library defaults
won't get in the way. And, default exchange
was added to AMQP spec exactly for simple
cases like yours. This scenario is described at
http://www.rabbitmq.com/tutorial-one-python.html.

Hope this helps.

2011/1/19 Robin Wood <robin at digininja.org>

>
> When I run the php I get:
>
> PHP Fatal error:  Uncaught exception 'AMQPQueueException' with message
> 'Server channel error: 406, message: PRECONDITION_FAILED - parameters
> for queue 'queue1' in vhost '/' not equivalent' in
> /home/robin/sched/a.php:13
> Stack trace:
> #0 /home/robin/sched/a.php(13): AMQPQueue->declare('queue1')
> #1 {main}
>  thrown in /home/robin/sched/a.php on line 13
>
>
-- 
MK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110119/ba543734/attachment.htm>


More information about the rabbitmq-discuss mailing list