Class: Liam::Producer

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Common
Defined in:
lib/liam/producer.rb

Constant Summary collapse

UNSUPPORTED_MESSAGE_ERROR =
'Unsupported message argument'
UNSUPPORTED_TOPIC_ERROR =
'Unsupported topic argument'
SKIPPED_MESSAGE =
'The message was skipped by the configuration of the environment'

Constants included from Common

Common::CONFIG_FILE

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Common

#client_options, #credentials, #env_credentials

Constructor Details

#initialize(message:, topic:, options: {}) ⇒ Producer

Returns a new instance of Producer.



20
21
22
23
24
# File 'lib/liam/producer.rb', line 20

def initialize(message:, topic:, options: {})
  @message = message
  @topic = topic
  @options = options
end

Class Method Details

.message(**args) ⇒ Object



26
27
28
# File 'lib/liam/producer.rb', line 26

def self.message(**args)
  new(**args).send(:execute)
end