-
May 12th, 2010, 10:47 AM
#1
What is the maximum capacity of a queue
Does anyone know what is the maximum capacity of a queue when I use the queue sub-element.
For example:
<channel id="queueChannel">
<queue capacity="25"/>
</channel>
this defines the queue capacity at 25. What is the maximum value that I can supply for this queue capacity?
-
May 12th, 2010, 11:09 AM
#2
Looking at the 1.0.4 code it appears that the max would be the max value of the "int" primative. (32 bit = 2,147,483,647)
<code>
public QueueChannel(int capacity) {
Assert.isTrue(capacity > 0, "The capacity must be a positive integer. " +
"For a zero-capacity alternative, consider using a 'RendezvousChannel'.");
this.queue = new LinkedBlockingQueue<Message<?>>(capacity);
}
</code>
- Scott
-
May 12th, 2010, 12:51 PM
#3
Yea, I thought that will probably be the case too ( that the maximum value for the queue capacity will be the maximum int capacity). But I was wondering that since it is a queue, it will be stored probably as an array or a linked list, and would run out of memory before the maximum value of int is reached.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules