Reputation: 53
In our project using WSO2 ESB(EI 6.1.0) we have some scenarios where we need to have to execute 2 tasks in parallel.
For example, we have a step for inserting steps of the execution in an audit table, and then proceed to the next steps.
For doing that, we use a clone mediator with a continueParent=true and inside the clone we have the sequence that inserts the audita data inside the db. As we set the continueParent=true, the next step doesn't wait the audit insertion to execute.
This is working fine, but in a high load test, we found that the heap is growing very large.
And checking the heap I see a lot of the instances of the clone mediator, and as it clones the context, it is growing a lot and causing OutOfMemory.
My question is:
Is there a way to have a similar behavior but not using the clone mediator?
Thanks,
Upvotes: 0
Views: 470
Reputation: 5946
If you need to execute asynchronous operations like inserting data in an audit table, you should consider the use of JMS queues in your primary mediation : only send those data in such queues and define a dedicated proxy service or jms inbound endpoint that will consume those messages and insert the data in your table
Upvotes: 1