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.
674 675 676 677 678 679 680 681 682 683 |
# File 'lib/bunny/topology_registry.rb', line 674 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)
670 671 672 |
# File 'lib/bunny/topology_registry.rb', line 670 def arguments @arguments end |
#callable ⇒ #call (readonly)
666 667 668 |
# File 'lib/bunny/topology_registry.rb', line 666 def callable @callable end |
#consumer_tag ⇒ String (readonly)
664 665 666 |
# File 'lib/bunny/topology_registry.rb', line 664 def consumer_tag @consumer_tag end |
#exclusive ⇒ Boolean (readonly)
668 669 670 |
# File 'lib/bunny/topology_registry.rb', line 668 def exclusive @exclusive end |
#manual_ack ⇒ Boolean (readonly)
668 669 670 |
# File 'lib/bunny/topology_registry.rb', line 668 def manual_ack @manual_ack end |
#queue_name ⇒ String (readonly)
664 665 666 |
# File 'lib/bunny/topology_registry.rb', line 664 def queue_name @queue_name end |
Instance Method Details
#==(other) ⇒ Boolean
731 732 733 734 735 736 737 738 739 |
# File 'lib/bunny/topology_registry.rb', line 731 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
725 726 727 |
# File 'lib/bunny/topology_registry.rb', line 725 def eql?(other) self == other end |
#hash ⇒ Object
741 742 743 |
# File 'lib/bunny/topology_registry.rb', line 741 def hash [self.class, self.channel, @queue_name, @consumer_tag, @callable, @exclusive, @manual_ack, @arguments].hash end |
#update_queue_name_to(value) ⇒ Object
686 687 688 689 |
# File 'lib/bunny/topology_registry.rb', line 686 def update_queue_name_to(value) @queue_name = value self end |
#with_arguments(value) ⇒ Object
720 721 722 723 |
# File 'lib/bunny/topology_registry.rb', line 720 def with_arguments(value) @arguments = value self end |
#with_callable(value) ⇒ Object
704 705 706 707 |
# File 'lib/bunny/topology_registry.rb', line 704 def with_callable(value) @callable = value self end |
#with_consumer_tag(value) ⇒ Object
698 699 700 701 |
# File 'lib/bunny/topology_registry.rb', line 698 def with_consumer_tag(value) @consumer_tag = value self end |
#with_exclusive(value) ⇒ Object
714 715 716 717 |
# File 'lib/bunny/topology_registry.rb', line 714 def with_exclusive(value) @exclusive = value self end |
#with_manual_ack(value) ⇒ Object
709 710 711 712 |
# File 'lib/bunny/topology_registry.rb', line 709 def with_manual_ack(value) @manual_ack = value self end |
#with_queue_name(value) ⇒ Object
692 693 694 695 |
# File 'lib/bunny/topology_registry.rb', line 692 def with_queue_name(value) @queue_name = value self end |