Closed kbdxbt closed 4 years ago
hello,I had a problem using this package
My question is that I want to use rabbitmq through topic mode. I use the mode of matching routes, but it has no effect. May I ask how I should use it or do you have any examples for reference?
Amqp::publish('fruit.red', 'message2' , [ 'exchange_type' => 'topic', 'exchange' => 'test.topick', ]);
Amqp::consume('red.queue', function ($message, $resolver) { var_dump($message->body); $resolver->acknowledge($message); }, [ 'routing' => '*.red', 'exchange' => 'test.topic', 'exchange_type' => 'topic', 'persistent' => true // required if you want to listen forever ]);
hello,I had a problem using this package
My question is that I want to use rabbitmq through topic mode. I use the mode of matching routes, but it has no effect. May I ask how I should use it or do you have any examples for reference?
Amqp::publish('fruit.red', 'message2' , [ 'exchange_type' => 'topic', 'exchange' => 'test.topick', ]);
Amqp::consume('red.queue', function ($message, $resolver) { var_dump($message->body); $resolver->acknowledge($message); }, [ 'routing' => '*.red', 'exchange' => 'test.topic', 'exchange_type' => 'topic', 'persistent' => true // required if you want to listen forever ]);