I have an application that is being monitored by AppDynamics. The application consumes from a JMS queue and publishes messages to a JMS topic.
I would like to create a widget that displays the number of messages it is consuming from the queue and the number of messages it is publishing to the topic.
How do I identify the data source of the queue and topic then retrieve the number of messages that the application is consuming and then publishing?
For the consumption of messages, these can be instrumented as Business Transactions (see https://docs.appdynamics.com/appd/22.x/latest/en/application-monitoring/configure-instrumentation/transaction-detection-rules/message-queue-entry-points) - then the BT count will be the number of messages consumed.
For the publishing to a topic, these will be represented as exit calls to a backend (assuming this is not instrumented) - then the backend (a.k.a Remote Service) call count will be the number of pushes to the topic.
For actually directly getting the number of messages on a queue, you may want to use a Machine Agent extension:
e.g.
Docs on using extensions can be found here: https://docs.appdynamics.com/appd/22.x/latest/en/infrastructure-visibility/machine-agent/extensions-and-custom-metrics