Class: Rdkafka::Opaque
- Inherits:
-
Object
- Object
- Rdkafka::Opaque
- Defined in:
- lib/rdkafka/config.rb
Instance Attribute Summary collapse
-
#consumer_rebalance_listener ⇒ Object
Returns the value of attribute consumer_rebalance_listener.
-
#producer ⇒ Object
Returns the value of attribute producer.
Instance Method Summary collapse
-
#call_delivery_callback(delivery_report, delivery_handle) ⇒ Object
Invokes the delivery callback on the producer if one is set.
-
#call_on_partitions_assigned(list) ⇒ Object
Invokes the on_partitions_assigned callback on the rebalance listener if set.
-
#call_on_partitions_revoked(list) ⇒ Object
Invokes the on_partitions_revoked callback on the rebalance listener if set.
Instance Attribute Details
#consumer_rebalance_listener ⇒ Object
Returns the value of attribute consumer_rebalance_listener.
436 437 438 |
# File 'lib/rdkafka/config.rb', line 436 def consumer_rebalance_listener @consumer_rebalance_listener end |
#producer ⇒ Object
Returns the value of attribute producer.
435 436 437 |
# File 'lib/rdkafka/config.rb', line 435 def producer @producer end |
Instance Method Details
#call_delivery_callback(delivery_report, delivery_handle) ⇒ Object
Invokes the delivery callback on the producer if one is set
441 442 443 |
# File 'lib/rdkafka/config.rb', line 441 def call_delivery_callback(delivery_report, delivery_handle) producer&.call_delivery_callback(delivery_report, delivery_handle) end |
#call_on_partitions_assigned(list) ⇒ Object
Invokes the on_partitions_assigned callback on the rebalance listener if set
447 448 449 450 451 452 |
# File 'lib/rdkafka/config.rb', line 447 def call_on_partitions_assigned(list) return unless consumer_rebalance_listener return unless consumer_rebalance_listener.respond_to?(:on_partitions_assigned) consumer_rebalance_listener.on_partitions_assigned(list) end |
#call_on_partitions_revoked(list) ⇒ Object
Invokes the on_partitions_revoked callback on the rebalance listener if set
456 457 458 459 460 461 |
# File 'lib/rdkafka/config.rb', line 456 def call_on_partitions_revoked(list) return unless consumer_rebalance_listener return unless consumer_rebalance_listener.respond_to?(:on_partitions_revoked) consumer_rebalance_listener.on_partitions_revoked(list) end |