@@ -47,7 +47,7 @@ public class GetResponse {
47
47
* @param envelope the {@link Envelope}
48
48
* @param props message properties
49
49
* @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
51
51
*/
52
52
public GetResponse (Envelope envelope , BasicProperties props , byte [] body , int messageCount )
53
53
{
@@ -82,8 +82,20 @@ public byte[] getBody() {
82
82
}
83
83
84
84
/**
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
87
99
*/
88
100
public int getMessageCount () {
89
101
return messageCount ;
0 commit comments