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

add rabbitmq:group:consumer command #38

Closed
wants to merge 1 commit into from
Closed

add rabbitmq:group:consumer command #38

wants to merge 1 commit into from

Conversation

sashaaro
Copy link

@sashaaro sashaaro commented Nov 8, 2020

No description provided.

@sashaaro sashaaro marked this pull request as ready for review November 8, 2020 17:16
@sashaaro sashaaro changed the title WIP: add rabbitmq:group:consumer command add rabbitmq:group:consumer command Nov 8, 2020
@theodormanolescu
Copy link
Collaborator

theodormanolescu commented Nov 10, 2020

how is this different from multiple_consumers ?

@sashaaro
Copy link
Author

sashaaro commented Nov 10, 2020

Multiple Consumers declare common one exchange for multiple queues.

As I meant in readme

Consume multiple queues by one worker command for reduce complexity and simplify debugging.
A lot of running php commands can consume significant memory size and 
would be not convinient in development and
testing environment which no need parallel executation.

rabbitmq:group:consumer command allow "subscribe" to any multiple exhanges for one worker.
and not depends from exchanges and queues declarations.

It's allow flexable configurate workers for different environments

A lot running php processes ./bin/console rabbitmq:consumer can consume many resources in dev/test environement.
It would usefull for projects where rabbitmq is primary transport for services communication.
For example one running rabbitmq:consumer take ~ 40 mb ram.
if some service have 25 consumers/queues then would take ~ 1gb ram totally.

You can use default group and easely consume combined all queues in synchronous mode for testing/debuging
$ ./bin/console rabbitmq:group:consumer
Of course in production supervisor can running every consumers separatly and parallel with standard ./bin/console rabbitmq:consumer command

@theodormanolescu
Copy link
Collaborator

Yes, multiple_consumers are locked to a exchange.
From what I see, what you need and what multiple_consummers offers is 90% similar.
Why not update multiple_consumers to support different exchanges, I think it requires less work?
Or with zero development you can have a separate config for dev environment with one exchange and the necessary routing keys.

@sashaaro
Copy link
Author

sashaaro commented Nov 17, 2020

Yes, multiple consumers allow define several queues with one exchange. It is make sense. I preferred don't touch it and create new GroupConsumer
Main idea - it doesn't content queue/exchange declarations, just combine existed exchanges by one consumer worker.

@sashaaro sashaaro closed this Nov 17, 2020
@sashaaro sashaaro reopened this Nov 17, 2020
@sashaaro
Copy link
Author

sashaaro commented Nov 26, 2020

@theodormanolescu I would like to hear opinions. This feature is unuseful? Probably I clearly explained goals.
By the way currency code design really worse and hard to extends. A lot of duplicate code and unclearly configuration.
I would be prefer rework main components and simplify yaml configs. Maybe in the future I send new pr

@sashaaro
Copy link
Author

@theodormanolescu ping

@sashaaro sashaaro closed this Mar 28, 2021
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

Successfully merging this pull request may close these issues.

2 participants