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

response queue abstraction #48

Open
norbu09 opened this issue Dec 4, 2017 · 2 comments
Open

response queue abstraction #48

norbu09 opened this issue Dec 4, 2017 · 2 comments

Comments

@norbu09
Copy link

norbu09 commented Dec 4, 2017

I really like this framework and contemplate using it over my current abstractions for RabbitMQ. One pattern I use quite often is to spin up a response queue, do a few things in various workers and then send the response back to the response queue.

Before I start writing any code on that I wanted to know if you have any thoughts on where that code would best sit in TaskBunny, if it even sits there at all or if you have any preferred way for adding it so that I can play around with some code that has a chance of being merged back in.

@ono
Copy link
Contributor

ono commented Dec 5, 2017

Hi @norbu09. I'm glad to hear you like the library.

I might not fully understand what you mean by the response queue but it doesn't sound like a scope of TaskBunny. TaskBunny is not a general RabbitMQ wrapper. TaskBunny is just a background processing library like Resque, Sidekiq, RQ etc. and we are bit cautious on adding extra features.

What you describe sounds like other type of message broker framework and maybe it doesn't make sense to add to TaskBunny?

@norbu09
Copy link
Author

norbu09 commented Dec 7, 2017

I have started to implement one part of what I am planning to do here: #49

The new enqueue call would look something like this:

TaskBunny.Job.enqueue!(Worker.Store, %{"job" => %{"foo" => "bar", "two" => 1}}, reply_to: "Worker.Log")

This would send a message with {"ok" => result} to a Worker.Log worker for further processing.

I hope the code and my explanations make it more obvious what I try to do. If you don't see a good fit for this in the core framework then I will just continue to work on my fork. without a way to push messages through queue stages I can't really build the systems I normally build :)

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

2 participants