Hi Davide. I'll try to explain. We inserting a lot of events per second into StatefulKnowledgeSession, this process performs in single thread. There is possible situation when our event processor engine (CEP) can crash under high load, so we trying to save actual last state of knowledge session as often as possible. For this purposes we use WorkingMemoryEventListener and perform session marshaling in every listener methods (and not only): public void objectInserted(ObjectInsertedEvent event) { marshalWorkingMemory(); } public void objectUpdated(ObjectUpdatedEvent event) { marshalWorkingMemory(); } public void objectRetracted(ObjectRetractedEvent event) { marshalWorkingMemory(); }
Marshaled working memory we put into infinispan to synchronize with other reserved CEP engines. Because of we use fireUntillHalt mode and events inserted very fast it appears that marshaling invokes in several threads. This approach causes mentioned exception from time to time. That is my case. I'll appreciate if you can suggest some another/better approach to save actual knowledge session state in case of crashing current engine. -- View this message in context: http://drools.46999.n3.nabble.com/ArrayIndexOutOfBoundsException-under-high-events-load-in-drools-CEP-tp4028071p4028107.html Sent from the Drools: User forum mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users