Hi, I was digging in the code base and was trying to understand how the broker is implemented. I see that for each message enqueued there are certain objects kept in memory one for each message.
example: MessageTransferReference, SimpleQueueEntryImpl etc. I tried computing the memory footprint of each individual message and it amounts about 320 bytes/message. I see that because of the footprint of each message, if i'm limited to 4GB of memory, then I am limited to only about 13 million messages in the system at one point. Since I'm using a persistent store I'd have expected to go over 13 million messages and be limited by disk store rather than physical memory, but I realized this isn't the case. I am curious as to what were the driving points for this design decision to keep a reference to every message in memory. I'd have expected in a FIFO queue you just need a subset of messages in memory and can pull in messages on demand rather than maintain reference to every message in memory. Can someone please explain as to the reasons for this design? Also, was it assumed that we'd never flood the queues over 13 million messages at one time. Was there a bound decided upon? Thank you, Praveen -- -Praveen
