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

Persistent message groups not expiring after restart of application



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.10, 5.1.1
    • Component/s: Core
    • Labels:


      When using a persistent MessageGroupStore instance like the JdbcMessageStore, message groups that have been stored prior to a restart of an application using the stated version of Spring Integration never expire if no further messages with the same correlation key (group ID) are being ever created. When using the JdbcMessageStore, messages, message groups and correlations remain in the INT_MESSAGE, INT_MESSAGE_GROUP and INT_GROUP_TO_MESSAGE tables in such cases potentially forever. The groups will neither be expired by the mechanism using group timeouts nor by any MessageGroupStoreReaper.

      With the bugfix for INT-3876 the AbstractCorrelatingMessageHandler has been adjusted to keep the group IDs of the previously stored and not yet expired messages groups as a Set<Object> and the method ForceReleaseMessageGroupProcessor.processMessageGroup(MessageGroup group) only completes message groups with IDs which are contained in this set. As this set exists only in memory and is never populated with IDs of groups which have been stored before and still exist after its initialization, the completion of those groups will always be skipped and they will never be expired.

      When thinking of initializing or populating the set of group IDs scenarios with multiple instances of the same application using a persistent MessageGroupStore (e.g. in an environment with microservices) should also be considered. Some mechanism fetching only disjoint sets of group IDs or cleaning up group IDs that were fetched by multiple instances might be required for solving this in a clean way.

      This problem could also be applicable for all versions since 5.0 GA as the bugfix for INT-3876 was released with that version.




            abilan Artem Bilan
            jonas.george Jonas George
            0 Vote for this issue
            3 Start watching this issue