-
Apr 19th, 2011, 08:57 AM
#1
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.
Artem
-
Apr 19th, 2011, 11:52 AM
#2
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
#3
Ok, Dave.
Thank you
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?
Artem
-
May 4th, 2011, 07:33 AM
#4
Hello.
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()?
Thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules