Spring's Metrics and Management: MessageChannel Metric Features describes:
If it is a
QueueChannel, you also see statistics for the receive operation as well as the count of messages that are currently buffered by thisQueueChannel
However:
These legacy metrics will be removed in a future release. See Micrometer Integration.
Where it describes:
The Counter Meters for receive operations on pollable message channels have the following names or tags:
name:spring.integration.receive[...]
which sounds like it only counts how many messages have been received. The number of messages in the queue doesn't seem to be available, not even by calculating receive - send (because there is no send).
So, with Spring Integration and Micrometer, is it even possible to read the queue size? How?