Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I use the topic pattern #76

Closed
kbdxbt opened this issue Dec 27, 2019 · 0 comments
Closed

How do I use the topic pattern #76

kbdxbt opened this issue Dec 27, 2019 · 0 comments

Comments

@kbdxbt
Copy link

kbdxbt commented Dec 27, 2019

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 ]);

@kbdxbt kbdxbt closed this as completed Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant