Class: Bunny::RecordedConsumer
- Inherits:
-
RecordedEntity
- Object
- RecordedEntity
- Bunny::RecordedConsumer
- Defined in:
- lib/bunny/topology_registry.rb
Overview
Represents a consumer (subscription) registration intent that can be repeated.
Instance Attribute Summary collapse
- #arguments ⇒ Hash readonly
- #callable ⇒ #call readonly
- #consumer_tag ⇒ String readonly
- #exclusive ⇒ Boolean readonly
- #manual_ack ⇒ Boolean readonly
- #queue_name ⇒ String readonly
Attributes inherited from RecordedEntity
Instance Method Summary collapse
- #==(other) ⇒ Boolean
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(ch, queue_name) ⇒ RecordedConsumer
constructor
A new instance of RecordedConsumer.
- #update_queue_name_to(value) ⇒ Object
- #with_arguments(value) ⇒ Object
- #with_callable(value) ⇒ Object
- #with_consumer_tag(value) ⇒ Object
- #with_exclusive(value) ⇒ Object
- #with_manual_ack(value) ⇒ Object
- #with_queue_name(value) ⇒ Object
Constructor Details
#initialize(ch, queue_name) ⇒ RecordedConsumer
Returns a new instance of RecordedConsumer.
676 677 678 679 680 681 682 683 684 685 |
# File 'lib/bunny/topology_registry.rb', line 676 def initialize(ch, queue_name) super ch @queue_name = queue_name @consumer_tag = nil @callable = nil @exclusive = false @manual_ack = true @arguments = Hash.new end |
Instance Attribute Details
#arguments ⇒ Hash (readonly)
672 673 674 |
# File 'lib/bunny/topology_registry.rb', line 672 def arguments @arguments end |
#callable ⇒ #call (readonly)
668 669 670 |
# File 'lib/bunny/topology_registry.rb', line 668 def callable @callable end |
#consumer_tag ⇒ String (readonly)
666 667 668 |
# File 'lib/bunny/topology_registry.rb', line 666 def consumer_tag @consumer_tag end |
#exclusive ⇒ Boolean (readonly)
670 671 672 |
# File 'lib/bunny/topology_registry.rb', line 670 def exclusive @exclusive end |
#manual_ack ⇒ Boolean (readonly)
670 671 672 |
# File 'lib/bunny/topology_registry.rb', line 670 def manual_ack @manual_ack end |
#queue_name ⇒ String (readonly)
666 667 668 |
# File 'lib/bunny/topology_registry.rb', line 666 def queue_name @queue_name end |
Instance Method Details
#==(other) ⇒ Boolean
733 734 735 736 737 738 739 740 741 |
# File 'lib/bunny/topology_registry.rb', line 733 def ==(other) other.class == self.class && other.channel == self.channel && other.queue_name == self.queue_name && other.callable == self.callable && other.manual_ack == self.manual_ack && other.exclusive == self.exclusive && other.arguments == self.arguments end |
#eql?(other) ⇒ Boolean
727 728 729 |
# File 'lib/bunny/topology_registry.rb', line 727 def eql?(other) self == other end |
#hash ⇒ Object
743 744 745 |
# File 'lib/bunny/topology_registry.rb', line 743 def hash [self.class, self.channel, @queue_name, @consumer_tag, @callable, @exclusive, @manual_ack, @arguments].hash end |
#update_queue_name_to(value) ⇒ Object
688 689 690 691 |
# File 'lib/bunny/topology_registry.rb', line 688 def update_queue_name_to(value) @queue_name = value self end |
#with_arguments(value) ⇒ Object
722 723 724 725 |
# File 'lib/bunny/topology_registry.rb', line 722 def with_arguments(value) @arguments = value self end |
#with_callable(value) ⇒ Object
706 707 708 709 |
# File 'lib/bunny/topology_registry.rb', line 706 def with_callable(value) @callable = value self end |
#with_consumer_tag(value) ⇒ Object
700 701 702 703 |
# File 'lib/bunny/topology_registry.rb', line 700 def with_consumer_tag(value) @consumer_tag = value self end |
#with_exclusive(value) ⇒ Object
716 717 718 719 |
# File 'lib/bunny/topology_registry.rb', line 716 def with_exclusive(value) @exclusive = value self end |
#with_manual_ack(value) ⇒ Object
711 712 713 714 |
# File 'lib/bunny/topology_registry.rb', line 711 def with_manual_ack(value) @manual_ack = value self end |
#with_queue_name(value) ⇒ Object
694 695 696 697 |
# File 'lib/bunny/topology_registry.rb', line 694 def with_queue_name(value) @queue_name = value self end |