I think you can find the answers to your questions in HornetQ's user's manual.
I have read the manual but it's no clear about this.
If persistent messages are saved to the store why paging message into files?
What's the relationship between the store and paging files?
You can think of paging as a totally different thing from the store. The purpose of paging is to enable hornetq server to handle large amount of messages while using a limited memory.
The following is my guess and I do not know it's corrent or not,please make me clear or I have to read source code:(
Will persistent messages sent from the client be persisted into the message store at first then they will be kept in paging,like some cache or message cursor, and they also will be persisted into paging files if paging memory exceeds the limitation.
Thank you so much.
1 of 1 people found this helpful
Re: Will persistent messages sent from the client be persisted into the message store at first then they will be kept in paging,like some cache or message cursor,
No. persistent messages are not necessarily to be paged. They are persisted in the message store.
Re: and they also will be persisted into paging files if paging memory exceeds the limitation.
I don't know what do you mean by "paging memory", but I guess it's not far from truth. I shall point out however that all messages (not only persistent ones) are subject to paging (based on configuration).
Please do read the user manual carefully, you will find it totally worth the while.
So what's the content of the paging files?
Is it some message data just like the content of the message store?
When I send thousands of messages to a queue, I note that the occupied space of the paging directory growing as well.
Another guess is that paging saves indexs of persistent messages not whole data of messages?
At last,thanks again for your timely and patient reply.
Howard is right, if you read the user manual in depth it will explain everything, however here is a brief overview.
Messages that are marked as Persistant will be saved in the message store. These however, along with Non Persistant mesages, will still be in memory. This is where paging comes in, if you get to a point where memory is an issue messages in memory paging will occur, both non persistant and persistant messages are paged to disc, however in reality with persistant messages its only really a reference to it in the message store.
More clear and thanks all!