Apr 19th, 2011, 08:57 AM
JdbcMessageStore & cluster
Hello, Mark and Oleg.
My question is:
Is there any guarantee that JdbcMessageStore after reboot the application will give messages to channel on only one node in the cluster?
I read the source code of MessageGroupQueue and saw the locks only in a single JVM.
Or how should be implemented storeLock, that it could work for the entire cluster?
Thanks in advance.
Apr 19th, 2011, 11:52 AM
There is such a guarantee if your RDBMS server provides it. You need to use a transaction manager in the poller, and you need the tx attributes to specify a sufficiently high isolation (e.g. SERIALIZABLE).
Apr 19th, 2011, 03:04 PM
I haven't got any free time for check it: I must include guarantee delivery for my message flow.
I configured all as you described and also how it was described in manual.
But there isn't guarantee in MessageGroupQueue.poll() between getUnmarked() and messageGroupStore.removeMessageFromGroup that different DB-sessions don't read the same data in one moment.
So, have I to describe different regions in JdbcMessageStore configuration for separate nodes of cluster?
Why do not you use "SELECT ... FOR UPDATE" for lock rows for one transaction?
May 4th, 2011, 07:33 AM
Dave, what about my questions?
I realized my statement about "SELECT ... FOR UPDATE" is mistake.
And now I've got another question:
Why you read all messageGroup if you use only one in MessageGroupQueue.poll()?
Tags for this Thread