Defaulting the message prefetch count to 1000 instead of infinity.

This commit is contained in:
Andrew Jackson committed 2016-10-11 20:42:52 +01:00
1 parent 4d7a64d127
commit b3dff8d9d6
1 file changed
+3 -18
@@ -153,25 +153,10 @@ public class AMQPUrlReceiver
/**
* The maximum prefetch count to use, meaning the maximum number of messages
* to be consumed without being acknowledged. Use 'null' to specify there
* should be no upper limit (the default).
* to be consumed without being acknowledged. Using 'null' would specify
* there should be no upper limit (the default).
*/
private Integer prefetchCount = null;
/**
* @return the prefetchCount
*/
public Integer getPrefetchCount() {
return prefetchCount;
}
/**
* @param prefetchCount
* the prefetchCount to set
*/
public void setPrefetchCount(Integer prefetchCount) {
this.prefetchCount = prefetchCount;
}
private Integer prefetchCount = 1000;
private transient Lock lock = new ReentrantLock(true);