Closed rustatian closed 9 months ago
The routing_key
should be in the headers that JOBS client sends to the RR.
Key -> x-routing-key
, value -> routing key (string).
This change is for the amqp
driver only. RR will check for this key and send data to the queue with the provided routing key.
Closed by: https://github.com/roadrunner-php/jobs/pull/58
Usage example:
use Spiral\RoadRunner\Jobs\Queue\AMQP\Header;
/** @var QueueInterface $queue */
$queue->push(
JobPayload::class,
$payload,
(new Options())
->onQueue('my_amqp_pipeline')
->withHeader(Header::ROUTING_KEY, '...')
->withDelay(20)
);
Description
This is a reference to the original ticket for the per-message
routing_key
implementation: https://github.com/roadrunner-server/roadrunner/issues/1555Planning to include in the RR
v2023.3.0
. CC: @rauanmayemir