Skip to content

Getting the total number of messages in a stream #155

Closed Answered by acogoluegnes
tinakurian-pki asked this question in Q&A
Discussion options

You must be logged in to vote

It's not possible using the stream Java client, but you can use the /api/queues/{vhost}/{stream-name} REST endpoint to get an estimation of the total number of messages.

E.g. for a stream stream in the / virtual host, it is http://localhost:15672/api/queues/%2F/stream and the estimated number of messages is in the messages property:

{
  "garbage_collection": {
    "max_heap_size": -1,
    "min_bin_vheap_size": -1,
    "min_heap_size": -1,
    "fullsweep_after": -1,
    "minor_gcs": -1
  },
  "consumer_details": [
    {
      "arguments": {},
      "channel_details": {
        "connection_name": "127.0.0.1:55370 -> 127.0.1.1:5552",
        "name": "",
        "node": "rabbit@acogoluegnes-nuc"

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by acogoluegnes
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants