Announcement Announcement Module
No announcement yet.
On demand release of incomplete messages from message store? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • On demand release of incomplete messages from message store?

    Is it possible to call a method that will release messages from a message store on demand, rather than waiting on a timeout for message groups that have not yet reached the sequence size?

  • #2
    Yes, just call expireMessageGroups with a less-than-zero timeout and all groups will be expired. Disposition of the messages will depend on settings.

     * Extract all expired groups (whose timestamp is older than the current time less the threshold provided) and call
     * each of the registered callbacks on them in turn. For example: call with a timeout of 100 to expire all groups
     * that were created more than 100 milliseconds ago, and are not yet complete. Use a timeout of 0 (or negative to be
     * on the safe side) to expire all message groups.
     * @param timeout the timeout threshold to use
     * @return the number of message groups expired
     * @see #registerMessageGroupExpiryCallback(MessageGroupCallback)
    int expireMessageGroups(long timeout);