isListeningTo method

bool isListeningTo({
  1. required String topic,
})

Check if there is at least one active subscription to the topic in this instance of Fkafka.

Implementation

bool isListeningTo({
  required String topic,
}) {
  return _subscribers[topic]?.isNotEmpty == true &&
      _subscribers[topic]!.any(
        (subscriber) => subscriber.isActive,
      );
}