Announcement Announcement Module
Collapse
No announcement yet.
JdbcMessageStore & cluster Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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).

    Comment


    • #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

      Comment


      • #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.

        Comment

        Working...
        X