Announcement Announcement Module
Collapse
No announcement yet.
MessageGroupStoreReaper + JdbcMessageStore = n + 1 select problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MessageGroupStoreReaper + JdbcMessageStore = n + 1 select problem

    I have a large number of messages in an aggregator which will not be correlated. Using a reaper to expire the messages utilizes the AbstractMessageGroupStore iterator abstraction to loop through the message groups and evaluate their age.

    While an elegant Java solution for the memory implementation, when implemented by the JdbcMessageStore, the respective iterator abstraction will result in n (LIST_MESSAGES_BY_GROUP_KEY query) + 1 (LIST_GROUP_KEYS query) select statements in the database. This poses no issue for a few messages, however it is not practical for thousands of messages. The DB server promptly chokes.
Working...
X