Class: BPS::Publisher::NATS::Topic
- Inherits:
-
Abstract::Topic
- Object
- Abstract::Topic
- BPS::Publisher::NATS::Topic
- Defined in:
- lib/bps/publisher/nats.rb
Instance Method Summary collapse
- #flush ⇒ Object
-
#initialize(client, topic) ⇒ Topic
constructor
A new instance of Topic.
- #publish(message, **_opts) ⇒ Object
Constructor Details
#initialize(client, topic) ⇒ Topic
Returns a new instance of Topic.
10 11 12 13 14 15 |
# File 'lib/bps/publisher/nats.rb', line 10 def initialize(client, topic) super() @client = client @topic = topic end |
Instance Method Details
#flush ⇒ Object
21 22 23 |
# File 'lib/bps/publisher/nats.rb', line 21 def flush(**) @client.flush(FLUSH_TIMEOUT) end |
#publish(message, **_opts) ⇒ Object
17 18 19 |
# File 'lib/bps/publisher/nats.rb', line 17 def publish(, **_opts) @client.publish(@topic, ) end |