0

Please see this link it describes a way to get the number of messages in the queue , but it can only be done once ! in this example , you cannot use a loop while to constantly know the number of messages - is there a way to know the number of messages constantly . You can see for yourself and request queue.method.message_count after each receipt - and you will always receive the same value! Please do not put a minus if it seemed to you that my question is stupid ! We are all learning !

1 Answers1

0

There is no correct way, you are doing it wrong... statistics are only updated every 5 seconds through the management api and should not be used as runtimes metrics. Getting the counts of messages directly from the queues constantly is an expensive operation.

jonharson
  • 11
  • 3