@@ -47,7 +47,7 @@ public class GetResponse {
4747 * @param envelope the {@link Envelope}
4848 * @param props message properties
4949 * @param body the message body
50- * @param messageCount the number of messages in the response
50+ * @param messageCount the server's most recent estimate of the number of messages remaining on the queue
5151 */
5252 public GetResponse (Envelope envelope , BasicProperties props , byte [] body , int messageCount )
5353 {
@@ -82,8 +82,20 @@ public byte[] getBody() {
8282 }
8383
8484 /**
85- * Get the message count included in this response
86- * @return the message count
85+ * Get the server's most recent estimate of the number of messages
86+ * remaining on the queue. This number can only ever be a rough
87+ * estimate, because of concurrent activity at the server and the
88+ * delay between the server sending its estimate and the client
89+ * receiving and processing the message containing the estimate.
90+ *
91+ * <p>According to the AMQP specification, this figure does not
92+ * include the message being delivered. For example, this field
93+ * will be zero in the simplest case of a single reader issuing a
94+ * Basic.Get on a private queue holding a single message (the
95+ * message being delivered in this GetResponse).
96+ *
97+ * @return an estimate of the number of messages remaining to be
98+ * read from the queue
8799 */
88100 public int getMessageCount () {
89101 return messageCount ;
0 commit comments