-
Notifications
You must be signed in to change notification settings - Fork 138
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
ActiveJob integration? #117
Comments
@carlhoerberg would you be up to contributing this? Hutch is opinionated but if we can get a to work with ActiveJob in a sensible way, I'm all for it. |
Yes, of course, just wanted to poll interest. On Tuesday 4 November 2014 at 18:07, Michael Klishin wrote:
|
Yeah, I think it is needed to be at least a bridge into more distributed systems(where Hutch shines). I made a mailer(https://github.com/danielfarrell/hutch_mailer) for that same purpose, but in rails 4.2 an ActiveJob interface would be a better fit. |
@michaelklishin The idea of it is create an new I have implmenet it and have an example with this(it can integration with ActiveJob well), i found:
When i integration with ActiveJob there is an problem, ActiveJob will only enqueue message to one queue and dequeue the message use If we can designed an good way to solve this then we can provide an great solution for rails to integration with RabbitMQ. |
@wppurking if you are asking about a way to produce a class reference from a queue name, Hutch doesn't have anything to offer at the moment since it typically does the opposite thing. However, it should be reasonably easy to achieve what you are looking for using the same convention and "queue-to-consumer" registry. Please take a look at how consumer classes are mapped to queue names, then you can come up with a way (or several ways) to do the opposite thing. |
@michaelklishin After i see the details about how consumer classes mapped to queue and have an thought about HutchAdapter:
But when I am implement |
@wppurking I don't know why a binding operation may be blocking, Sounds like ActiveJob has a fair number of differences with Hutch. What is the benefit of using Hutch via ActiveJob? Does it justify the effort? Wouldn't it be easier to produce an ActiveJob implementation on top of Bunny alone and not Hutch? |
@michaelklishin First problem: i am working on it to invest this. Hutch Why i am expand thisI have compared bunny, sneakers and hutch, that i want to expand hutch to work with ActiveJob well have some point below:
Integrate with ActiveJobIntegrate Hutch and ActiveJob in the structure layer is not complex. If i can`t change the |
We have implemented a simple concern that does a few things:
For example, if we have a message 'staff.updated', and a consumer called 'refresh_staff_profile.rb', then all we have to do is create a 'refresh_staff_profile_job.rb', and add keyword parameters to the perform method, rather than splat args. This works nicely. It's pretty new and specific to our needs, but it might be what you're looking for? |
Like: https://github.com/rails/rails/blob/master/activejob/lib/active_job/queue_adapters/sneakers_adapter.rb
The text was updated successfully, but these errors were encountered: