Skip to content

documentation for multiple queues with the symfony bundle #920

New issue

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

By clicking “No 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? No Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

lostfocus
Copy link

As mentioned in #919 - and in #806 and #838

There is not really any new information on this page but it should answer this pretty common question which I have found unanswered previously both here and on StackOverflow.


Both ways will enable you to run a queue called `say` exclusively with the [cli command](cli_commands.md) `bin/console enqueue:consume say` or run all tasks except those in the `say` queue with `bin/console enqueue:consume --skip=say`

Beware that messages for this topic will end up in the router queue first - so if you don't have a process running that consumes the router queue, your messages will never _really_ reach the `say` queue. In that case you'll still have to run `bin/console enqueue:consume default` - or, if you have changed the name of your router queue: `bin/console enqueue:consume router`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command accepts several queues

It would be good to suggest users use

bin/console enqueue:consume say default

with clarifications on why default should be there

Other than that it looks great! Thank you @lostfocus for your work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Life got into the way, sorry. :) I'll clear it up later.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I've re-read my paragraphs and I'm not all that sure why default should be there. I figured that with two queue runners - one only running the say queue and the other one running all and/or only the default default - everything should be fine?

use Enqueue\Client\CommandSubscriberInterface;
use Interop\Queue\Processor;

class SayHelloProcessor implements Processor, TopicSubscriberInterface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi: you don't have to implement TopicSubscriberInterface interface if you use enqueue.processor tag.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you implement TopicSubscriberInterface then a tag is not needed as the service is autoconfigured with enqueue.topic_subscriber tag.

@balabis
Copy link
Contributor

balabis commented Sep 17, 2019

This is really missing from the documentation. Helped me a lot, thanks :)

@Steveb-p
Copy link
Contributor

Sorry @balabis, this PR kinda got lost :)

@lostfocus, would you mind revisiting this?

@stale
Copy link

stale bot commented Oct 25, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 25, 2019
@stale stale bot closed this Nov 1, 2019
@mleczakm
Copy link

This docs saved me a lot of time - it should be officially merged definitely!

No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants