At the moment - only way I can think of is to define a custom service in the code where the message gets pushed into the queue and then use the metric.
Queues are still considered second class citizens within Dynatrace and you don’t have any metrics for them.
In MDA you can count the number of requests writing to the queue, but this is not the same as number of messages written into the queue.
@Babar_Qayyum with the extension you will have the metric, but it’s only about the queue. You cannot distinguish between sources of the messages that go into the queue.