title: RabbitMQ - Get total count of messages enqueued
body: <p>I have a Java client which monitors RabbitMQ queue. I am able to get the count of messages currently in queue with this code</p>
  
  <pre><code>@Resource
  RabbitAdmin rabbitAdmin;
  ..........
  
  DeclareOk declareOk = rabbitAdmin.getRabbitTemplate().execute(new ChannelCallback&lt;DeclareOk&gt;() {
          public DeclareOk doInRabbit(Channel channel) throws Exception {
              return channel.queueDeclarePassive("test.pending");
          }
      });
       return declareOk.getMessageCount();
  </code></pre>
  
  <p>I want to get some more additional details like  - </p>
  
  <ol>
  <li>Message body of currently enqueued items.</li>
  <li>Total number of messages that was enqueued in the queue since the queue was created.</li>
  </ol>
  
  <p>Is there any way to retrieve these data in Java client? </p>