开发者

How do I set delivery_mode on message using php extension AMQP with RabbitMQ?

I've set whole infrastructure meaning I've configure php with AMQP extension http://www.php.net/manual/en/book.amqp.php. I've set up durable exchange and queue. Now I know I should publish message with delivery_mode = 2 (or equivalent to it in php) according to http://www.rabbitmq.com/tutorial-two-python.html. I don't know if I can do 开发者_StackOverflow社区that and if so I don't know how.


$message = new AMQPMessage(serialize($object), array('content_type' => 'text/plain', 'delivery_mode' => 2));

This is using http://code.google.com/p/php-amqplib/, but I guess the native extension has a similar syntax.


If you use my Amqp library you can use the documentation to get you started


Documentation was updated (on february 4th) and explains it all http://www.php.net/manual/en/amqpexchange.publish.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜