Skip to navigationSkip to main contentSkip to footerScaleway Docs

NATS queue is reporting more messages than expected to Scaleway Cockpit

My NATS queue is reporting an unexpectedly large number of messages to Cockpit

You may be viewing your NATS queue's metrics in Scaleway Cockpit, and observe an unexpectedly large volume of messages, which appears higher than your expected usage.

Cause

This is due to the way that the number of messages is displayed on Grafana. The count is accurate, but perhaps not intuitive.

Solution

You can better understand the volume of messages by considering the following points:

  • The message count reported by Grafana includes not only published messages, but also requests and replies between clients and the NATS server, such as publish requests, pull requests, and replies.
  • For example, when a client sends a nats stream ls request, this counts as 1 message IN (the request) and 1 message OUT (the reply), even if no actual messages are being published or consumed.
  • Additionally, the message count can increase due to consumer pull actions, even if there are no new messages published. This is because each pull request is counted as a message, regardless of whether any messages are actually returned.
Still need help?

Create a support ticket
No Results