How to reproduce:

XGROUP CREATE mystream mygroup $ MKSTREAM
XREADGROUP GROUP mygroup myconsumer BLOCK 2000 COUNT 10 STREAMS mystream >
XINFO CONSUMERS mystream mygroup

=> No consumers are listed

As far as I understand, consumer statistics are derived from pending-message metadata and therefore a consumer that has never received a message is not listed here. So I conclude that this is probably intended behaviour but it's still not ideal. Neither would I expect this from a conceptual standpoint nor is it explicitly mentioned in the documentation.

In our case, it also has direct impact on the complexity of our implementation: The fact that consumers without processed messages are not listed, makes it more complicated for us to identify the entirety of idling consumers. We scale k8s pods based on the traffic that we see in job-queues (implemented with streams) and the workload that we can observe across all associated pods. In this context, the information about idling consumers that Redis provides is theoretically extremely helpful to understand the current workload.

But when traffic reduces while new pods are launched then these pods may not see any messages for a long time. If the consumer statistics also included consumers that have never received messages and listed them as idle, then this edge case would be covered and the consumer statistics would become a pretty reliable source for understanding workloads in our case.

Comment From: alubbe

Or should we just 'initialize' each consumer by sending it a junk message, so that it's listed?