Removing scheduled message from queue cause incorrect number of messages reported by count-messages operation.
It looks like the operation count-messages returns value equal to actual number of messages minus number of removed scheduled messages
- send 1 message with _AMQ_SCHED_DELIVERY property set to several minutes
- remove scheduled emssage using CLI operation remove-message
- find out number of messages on queue using CLI operation count-messages - it returns value -1
This is broker related issue. It is regression against Artemis 1.5.