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.
419 420 421 |
# File 'lib/rdkafka/config.rb', line 419 def consumer_rebalance_listener @consumer_rebalance_listener end |
#producer ⇒ Object
Returns the value of attribute producer.
418 419 420 |
# File 'lib/rdkafka/config.rb', line 418 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
424 425 426 |
# File 'lib/rdkafka/config.rb', line 424 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
430 431 432 433 434 435 |
# File 'lib/rdkafka/config.rb', line 430 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
439 440 441 442 443 444 |
# File 'lib/rdkafka/config.rb', line 439 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 |