Class: BPS::Publisher::STAN
- Inherits:
-
Abstract
- Object
- Abstract
- BPS::Publisher::STAN
- Defined in:
- lib/bps/publisher/stan.rb
Defined Under Namespace
Classes: Topic
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(cluster_id, client_id, **opts) ⇒ STAN
constructor
A new instance of STAN.
- #topic(name) ⇒ Object
Constructor Details
Instance Method Details
#close ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/bps/publisher/stan.rb', line 38 def close super # NATS/STAN does not survive multi-closes, so close only once: @client&.close @client = nil end |
#topic(name) ⇒ Object
34 35 36 |
# File 'lib/bps/publisher/stan.rb', line 34 def topic(name) @topics[name] ||= self.class::Topic.new(@client, name) end |