bschmitt / laravel-amqp

AMQP wrapper for Laravel and Lumen to publish and consume messages
MIT License
270 stars 86 forks source link

Add priority property to message headers #121

Closed askuksov closed 5 months ago

duycong2509 commented 5 months ago

You can create message with priority property

use Bschmitt\Amqp\Message;
use Bschmitt\Amqp\Facades\Amqp;

$message = new Message(json_encode($data), [
    'priority' => 10
]);

Amqp::publish('routing-key', $message);
askuksov commented 5 months ago

You can create message with priority property

use Bschmitt\Amqp\Message;
use Bschmitt\Amqp\Facades\Amqp;

$message = new Message(json_encode($data), [
    'priority' => 10
]);

Amqp::publish('routing-key', $message);

It works. Thank you!