Pulsar does not natively support logging consumer login and logout events directly. However, you can track consumer activity through audit logs, which capture various authorization activities in Pulsar clusters, including produce, consume, and acknowledge events. To enable audit logs, you need to configure them on the PulsarCoordinator CR or PulsarBroker CR, depending on your Pulsar version, and specify the categories of events you want to capture, such as Management, Describe, Produce, and Consume events.
For more detailed tracking of consumer events, you might consider implementing a custom solution using Pulsar's structured event logging capabilities or consumer event listeners, which are available in some Pulsar client libraries. These can help you monitor when consumers become active or inactive, although they do not explicitly log login/logout events.
Would you like more details on configuring audit logs or using consumer event listeners?
Sources:
-
StreamNative Private Cloud Audit Log
-
StreamNative Cloud Audit Log 👍 0 button 👎 0 button 💡
Hint: Mention @runllm in the thread for followups.