I've found plenty of examples of setting message priority in RabbitMQ for Java, Spring, etc. but so far I haven't found how to implement this in PHP.
In fact the $channel->basic_publish()
function doesn't appear to support supplying additional parameters (https://github.com/videlalvaro/php-amqplib/blob/master/PhpAmqpLib/Channel/AMQPChannel.php), even though you can do this in the RabbitMQ gui.
Has anyone got message priorities working with RabbitMQ in PHP?
OK, it was staring me in the face the whole time. You set the priority in the actual
message
object, not when you push it into the queue: