Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-2912

JdbcMessageStore doesn't provide 'region' for some queries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Complete
    • Affects Version/s: 2.2.1
    • Fix Version/s: 3.0 M1
    • Component/s: JDBC Support
    • Labels:

      Description

      Sample config:

      <jdbc:message-store id="messageStore1" data-source="dataSource" region="1"/>
      <jdbc:message-store id="messageStore2" data-source="dataSource" region="2"/>
      <aggregator id="aggregator1" correlation-strategy-expression="payload['id']"
              expire-groups-upon-completion="true"
      	message-store="messageStore1"/>
      <aggregator id="aggregator2" correlation-strategy-expression="payload['id']"
              expire-groups-upon-completion="true"
      	message-store="messageStore2"/>
      

      I've caught an issue on JdbcMessageStore#addMessageToGroup, when groupNotExist == false, but query for createdDate ends up with:

      Caused by: org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0

      .
      Because the group exists in the another region.
      So, I see several queries don't have a parameter placeholder REGION=?.
      It causes many issues, if want to use the same groupKey in the separate regions

      By the way MongoDbMessageSource looks correct.

      Workaround to use different groupKeys always, independently of region.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hillert Gunnar Hillert
              Reporter:
              abilan Artem Bilan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: