java - python rabbitmqadmin list queues command doesn't obtain messages content although messages exist -


i learning rabbitmq , and want know how wath queue content.

first of want day googled question , know command

python rabbitmqadmin list queues 

i have written 2 separated applications.

sender:

@autowired private amqptemplate template;  ...    (int = 0; < 100; i++) {         template.convertandsend("queue1", "message_" + i);   } 

receiver:

@rabbitlistener(queues = "queue1") public void listenqueue1(string message, @header(amqpheaders.delivery_tag) long tag) {     logger.info("got message:[" + message + "]"); } 

if run these applications - see messages on receiver side.

to see messages in queue decided stop receiver , run sender

  1. i run sender
  2. execute python rabbitmqadmin list queues

and see following result:

+-----------------+----------+ |      name       | messages | +-----------------+----------+ | query-example-6 |          | | queue1          |          | | queue2          |          | | queue3          |          | | queue4          |          | | queue5          |          | | queue6          |          | | queue7          |          | | queue8          |          | | queue9          |          | +-----------------+----------+ 

3.then run receiver , see logs receiver accepted messages

can clarify reason why can't see messages in console?

how see queue messages content.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -