Class: KubeMQ::CQ::CommandsSubscription
- Inherits:
-
Object
- Object
- KubeMQ::CQ::CommandsSubscription
- Defined in:
- lib/kubemq/cq/commands_subscription.rb
Overview
Configuration for subscribing to command requests.
Pass to KubeMQ::CQClient#subscribe_to_commands along with a block to receive CommandReceived 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) ⇒ CommandsSubscription
constructor
A new instance of CommandsSubscription.
-
#subscribe_type ⇒ Integer
private
Returns the subscribe type constant for the transport layer.
Constructor Details
#initialize(channel:, group: nil) ⇒ CommandsSubscription
Returns a new instance of CommandsSubscription.
31 32 33 34 |
# File 'lib/kubemq/cq/commands_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/commands_subscription.rb', line 27 def channel @channel end |
#group ⇒ String?
Returns consumer group for load-balanced delivery.
27 |
# File 'lib/kubemq/cq/commands_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/commands_subscription.rb', line 40 def subscribe_type SubscribeType::COMMANDS end |