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

JdbcMessageStore doesn't provide 'region' for some queries

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Complete
    • 2.2.1
    • 3.0 M1
    • JDBC Support

    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

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

              Dates

                Created:
                Updated:
                Resolved: