Class: Pgbus::EventBus::Handler
- Inherits:
-
Object
- Object
- Pgbus::EventBus::Handler
- Defined in:
- lib/pgbus/event_bus/handler.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.dedup_cache ⇒ Object
15 16 17 |
# File 'lib/pgbus/event_bus/handler.rb', line 15 def dedup_cache @dedup_cache ||= DedupCache.new end |
.idempotent! ⇒ Object
7 8 9 |
# File 'lib/pgbus/event_bus/handler.rb', line 7 def idempotent! @idempotent = true end |
.idempotent? ⇒ Boolean
11 12 13 |
# File 'lib/pgbus/event_bus/handler.rb', line 11 def idempotent? @idempotent == true end |
Instance Method Details
#handle(event) ⇒ Object
24 25 26 |
# File 'lib/pgbus/event_bus/handler.rb', line 24 def handle(event) raise NotImplementedError, "#{self.class.name} must implement #handle(event)" end |
#process(message) ⇒ Object
20 21 22 |
# File 'lib/pgbus/event_bus/handler.rb', line 20 def process() with_rails_executor { process!() } end |