Skip to content

Exchange configuration

Choose a tag to compare

@hugofcampos hugofcampos released this 04 Nov 15:50

The SDK now supports exchange configuration, like the following:

// ...
'queue.exchanges' => [
    'exchange.test' => [                
        'type' => 'fanout'
        'passive' => false,
        'durable' => true,
        'auto_delete' => false,
        'internal' => false,
        'nowait' => false,
        'arguments' => false,
        'ticket' => false,
        'delivery_mode' => 2
    ]
],
// ...

And then, setting in the Publisher

use MessageQueuePHP\Publisher\Publisher;

$myPublisher = new Publisher($amqpAdapter, 'worker.test', 'exchange.test');