Instrumentation for MQTT messages

Hi All

I am looking for some instrumentation for MQTT messages for debugging and for analytical use cases.

  1. Given message is reached broker or not.
  2. Given message is received by a client or not.
  3. Number of messages fired from client.
  4. Number of messages received by client.
  5. Active client at given time.

One possible solution I can think of is : Setup a subscriber for each topic to just log the messages with messageId.

We are using pay as you go product, is there any better approach to get these metrics.