Class: Heller::Producer
- Inherits:
-
Object
- Object
- Heller::Producer
- Defined in:
- lib/heller/producer.rb
Instance Method Summary collapse
- #disconnect ⇒ Object (also: #close)
-
#initialize(broker_list, options = {}) ⇒ Producer
constructor
A new instance of Producer.
- #push(messages) ⇒ Object
Constructor Details
#initialize(broker_list, options = {}) ⇒ Producer
Returns a new instance of Producer.
5 6 7 |
# File 'lib/heller/producer.rb', line 5 def initialize(broker_list, = {}) @producer = create_producer(.merge(brokers: broker_list)) end |
Instance Method Details
#disconnect ⇒ Object Also known as: close
13 14 15 |
# File 'lib/heller/producer.rb', line 13 def disconnect @producer.close end |
#push(messages) ⇒ Object
9 10 11 |
# File 'lib/heller/producer.rb', line 9 def push() @producer.send(ArrayList.new(Array())) end |