Provides Wisper with asynchronous event publishing using ActiveJob.
gem 'wisper-activejob'publisher.subscribe(MyListener, async: true)The listener must be a class (or module), not an object. This is because ActiveJob can not reconstruct the state of an object. Whereas a class has no state.
Additionally, you should also ensure that your methods used to handle events under MyListener are all declared as class methods:
class MyListener
def self.event_name
end
endWhen publshing events the arguments must be simple types as they need to be
serialized, or the object must include GlobalID such as ActiveRecord models.
You can also customize queue name, retry value and other queue options when registering the listener like the following:
publisher.subscribe(MyListener, async: { queue: 'custom', retry: false })1.9.3+ including JRuby and Rubinius.
See the build status for details.
Please send a Pull Request or an Issue to discuss your idea first.
- Bump VERSION
- Push to master
- rake build
- rake release



