> Why not just send two messages? One to a real queue, and another one,
> with no payload, to a queue called 'notifications'.
It indeed does, but it would be useful in case there is only one producer (or not many of them). We can have lot of producers and that would bring tons of messages in notification queue (in the worst case one for every message in the 'real' queue).
Another issue would be sending of such notification messages since producers are not willing to be changed ;-)
How about one process that polls (using passive queue.declare) the main queue every n seconds? When the message count changes (hmm, what if consumers are keeping it at zero) it can send a small notification. That way the producers don't have to be changed.