Class: KubeMQ::CQ::QueriesSubscription
- Inherits:
-
Object
- Object
- KubeMQ::CQ::QueriesSubscription
- Defined in:
- lib/kubemq/cq/queries_subscription.rb
Overview
Configuration for subscribing to query requests.
Pass to KubeMQ::CQClient#subscribe_to_queries along with a block to receive QueryReceived messages. Use #group for load-balanced delivery across multiple responders.
Instance Attribute Summary collapse
-
#channel ⇒ String
Channel name to subscribe to.
-
#group ⇒ String?
Consumer group for load-balanced delivery.
Instance Method Summary collapse
-
#initialize(channel:, group: nil) ⇒ QueriesSubscription
constructor
A new instance of QueriesSubscription.
-
#subscribe_type ⇒ Integer
private
Returns the subscribe type constant for the transport layer.
Constructor Details
#initialize(channel:, group: nil) ⇒ QueriesSubscription
Returns a new instance of QueriesSubscription.
31 32 33 34 |
# File 'lib/kubemq/cq/queries_subscription.rb', line 31 def initialize(channel:, group: nil) @channel = channel @group = group end |
Instance Attribute Details
#channel ⇒ String
Returns channel name to subscribe to.
27 28 29 |
# File 'lib/kubemq/cq/queries_subscription.rb', line 27 def channel @channel end |
#group ⇒ String?
Returns consumer group for load-balanced delivery.
27 |
# File 'lib/kubemq/cq/queries_subscription.rb', line 27 attr_accessor :channel, :group |
Instance Method Details
#subscribe_type ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the subscribe type constant for the transport layer.
40 41 42 |
# File 'lib/kubemq/cq/queries_subscription.rb', line 40 def subscribe_type SubscribeType::QUERIES end |