Class: Strum::Esb::Action

Inherits:
Message
  • Object
show all
Defined in:
lib/strum/esb/action.rb

Overview

Action message

Constant Summary

Constants inherited from Message

Message::FROZEN_EXCHANGE_OPTIONS

Instance Attribute Summary

Attributes inherited from Message

#args, #exchange, #exchange_options, #headers, #payload, #rabbit_channel

Class Method Summary collapse

Methods inherited from Message

#extend_headers, #initialize, #prepare_publication_options, publish, #publish

Constructor Details

This class inherits a constructor from Strum::Esb::Message

Class Method Details

.call(payload, action, resource, exchange: Strum::Esb.config.action_exchange, **opts) ⇒ Object



10
11
12
# File 'lib/strum/esb/action.rb', line 10

def call(payload, action, resource, exchange: Strum::Esb.config.action_exchange, **opts)
  publish(headers: { resource: resource, action: action }, payload: payload, exchange: exchange, **opts)
end