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'

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:, options: {}, topic:) ⇒ Producer

Returns a new instance of Producer.



17
18
19
20
21
# File 'lib/liam/producer.rb', line 17

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

Class Method Details

.message(*args) ⇒ Object



23
24
25
# File 'lib/liam/producer.rb', line 23

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