Announcement Announcement Module
Collapse
No announcement yet.
What is the maximum capacity of a queue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #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

    Comment


    • #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.

      Comment

      Working...
      X