Hello Iñigo-

In short, the cursors are a layer on-top of the persistence store (kahadb or 
other) that manages how messages are paged from the store and dispatched to 
consumers.

There are multiple message cursors available and they each provide different 
capabilities to meet the needs of various message flow patterns.

For a full technical understanding, you’d need to dive into the code to 
understand all things that go into maintaining message ordering, priority, 
once-and-only-once delivery and performance benefits— as well as the message 
cursor impacts brought on by various message flow patterns.

Hope this helps!

Thanks,
Matt Pavlovich

> On Oct 9, 2023, at 5:56 AM, Iñigo Telleria <telle...@gmail.com> wrote:
> 
> Hi,
> 
> I'm trying to understand how ActiveMQ's broker manages persistent messages 
> internally, and I have some questions that I'd like to discuss.
> 
> Persistent messages are stored in the Message Store, such as KahaDB. The 
> KahaDB architecture comprises several elements: datalogs, cache, BTree 
> indexes, etc.
> 
> In addition to the Message Store, ActiveMQ has another element where messages 
> are also stored: Message Cursors.
> 
> My main question is whether the Message Store and the Message Cursors are 
> somehow interconnected or if they are independent elements within the broker. 
> For instance, the Message Store has a cache to store messages in memory, but 
> the Message Cursor also stores messages in memory (in the Pending Cursor). 
> Therefore, I'm curious if the Message Store's cache is the same as the 
> Pending Cursor. In other words, would the same message be stored twice in 
> memory (once in the cache and once in the pending cursor)?
> 
> I would greatly appreciate any assistance in clarifying these doubts. Thank 
> you in advance.
> 
> 

Reply via email to