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

consumer: BaseConsumer is prepared to handle only one action #56

Open
diegodelemos opened this issue Oct 17, 2018 · 0 comments
Open

consumer: BaseConsumer is prepared to handle only one action #56

diegodelemos opened this issue Oct 17, 2018 · 0 comments

Comments

@diegodelemos
Copy link
Member

Right now, the BaseConsumer class is prepared to handle only one action. It is possible that in the near future we will have to consume from multiple queues and therefore perform different actions accordingly.

There are at least two options, that I can see now, to implement this:

  • Follow how Celery uses kombu.ConsumerMixin, which can be seen here. Basically, the ConsumerMixin class takes a mapping with the different types of messages and the different actions, so depending on the message type a concrete function is called

  • Use the ConsumerMixin as a Consumer runner which contains different ConcreteConsumers for different use cases like JobStatus, WorkflowLogs, FilePullStatus. For doing this there might be a limitation since by default ConsumerMixin uses the kombu.Consumer class, see here, so we might need to reimplement it.

    aggreation-of-consumers

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

No branches or pull requests

2 participants