Class: CustomConsumer
- Inherits:
-
ApplicationConsumer
- Object
- Karafka::BaseConsumer
- Rimless::Consumer::Base
- ApplicationConsumer
- CustomConsumer
- Defined in:
- lib/rimless/tasks/templates/custom_consumer.rb
Overview
A dedicated consumer to handle event-messages from your producing application. Just write a method with the name of an event and it is called directly with all the event data as parameters.
Instance Attribute Summary
Attributes inherited from Rimless::Consumer::Base
Instance Method Summary collapse
-
#custom_event(property1:, property2: nil) ⇒ Object
Handle
custom_eventevent messages.
Methods inherited from Rimless::Consumer::Base
#arguments, build_for_job, #consume, #event, job_deserializers
Instance Method Details
#custom_event(property1:, property2: nil) ⇒ Object
Handle custom_event event messages.
8 9 10 11 |
# File 'lib/rimless/tasks/templates/custom_consumer.rb', line 8 def custom_event(property1:, property2: nil) # Do whatever you need to do Rails.logger.debug([property1, property2]) end |