Skip to content

Conversation

@stevehillman
Copy link
Contributor

This PR changes the ActiveMQ ChangeLog processor to only create one ActiveMQ session per Connection, rather than one per message. Each AMQ Session starts a new thread, and the "one per message" model was causing OOM errors when large changes were processed.

Each created Session spawns a thread to handle message transmission.
Prior to this change, each change resulted in a new thread being
created. If the ChangeLog had a large number of pending changes
(10s of thousands), memory starvation occurred. This change serializes
message transmission
- The previous behaviour used a separate session in the ActiveMQ client
  library for each message being sent. Each session spawns two threads. If
  a Change Log update involved too many changes, memory exhaustion could
  occur.

The old behaviour can be restored by setting

  grouper.messaging.system.activeMqMessaging.useSharedSession = false

in grouper.client.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant