Class: StompActors::Producer
- Inherits:
-
Object
- Object
- StompActors::Producer
- Includes:
- Celluloid, Celluloid::Logger, Client
- Defined in:
- lib/stomp_actors/producer.rb
Instance Method Summary collapse
- #emit(msg, opts = {}) ⇒ Object
-
#initialize ⇒ Producer
constructor
A new instance of Producer.
Methods included from Client
#connect, #disconnect, included
Constructor Details
#initialize ⇒ Producer
Returns a new instance of Producer.
10 11 12 |
# File 'lib/stomp_actors/producer.rb', line 10 def initialize async.connect end |
Instance Method Details
#emit(msg, opts = {}) ⇒ Object
14 15 16 |
# File 'lib/stomp_actors/producer.rb', line 14 def emit(msg, opts = {}) client.publish(queue, msg, opts) end |