Class: Clamour::Message::Receive

Inherits:
Object
  • Object
show all
Includes:
Handler
Defined in:
lib/clamour/message/receive.rb

Overview

Unpack message and reroute it using the same Subscription.

Class Method Summary collapse

Methods included from Handler

#on_message, #perform

Class Method Details

.perform(wired, subscription) ⇒ Object

Parameters:



10
11
12
13
14
# File 'lib/clamour/message/receive.rb', line 10

def self.perform(wired, subscription)
  attributes = ActiveSupport::HashWithIndifferentAccess.new(wired.payload)
  type = attributes[:_type]
  subscription.route(type, attributes)
end