Queue with Routing Key


#1

Hello,

It is possible to define a Queue with an Routing Key? If it possible, how can I define the Routing Key for a Queue?

Best Regards
Christian


#2

Hi Christian,
Spryker support RabbitMQ OTB and you can define an exchange with several routes with different keys.

$queueOptionTransfer = new RabbitMqOptionTransfer();
$queueOptionTransfer
->setQueueName($errorQueueName)
->setDurable(true)
->setNoWait(false)
->addRoutingKey($routingKey);

check \Pyz\Client\RabbitMq\RabbitMqConfig.php for more example


#3

Thank you for your help :slight_smile: