Results 1 to 4 of 4

Thread: JdbcMessageStore & cluster

  1. #1
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    737

    Default 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. #2
    Join Date
    Jun 2005
    Posts
    4,241

    Default

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

  3. #3
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    737

    Default

    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

  4. #4
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    737

    Default

    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
  •