<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Thanks for your reply.</div>

<div>&nbsp;</div>

<div>I tried around and found out that the main problem seemed to be the multithreaded setup combined with fireUntilHalt().</div>

<div>When I switched to single threaded and using fireAllRules() every 1000 events everything works fine. No race conditions. (And no freezing when inserting events (I didn&#39;t describe this problem in my previous email but after a few 1000 event insertions Drools sometimes froze during &quot;entryPoint1.insert(obj)&quot; and didn&#39;t recover.))</div>

<div>&nbsp;</div>

<div>I&#39;m able to handle the 50k events within 4 seconds now with that I&#39;m quite happy :)</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>&gt;&gt; The Alarm tied to some eventValue is OK. But I&#39;d try and accumulate the matching events &quot;manually&quot; into a list kept in the Alarm fact</div>

<div>Does this work with Events/Facts that have an expiration Date? Would the event/fact be automatically removed from this list when it expires?</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b>&nbsp;Montag, 20. Januar 2014 um 22:02 Uhr<br/>
<b>Von:</b>&nbsp;&quot;Wolfgang Laun&quot; &lt;wolfgang.laun@gmail.com&gt;<br/>
<b>An:</b>&nbsp;&quot;Rules Users List&quot; &lt;rules-users@lists.jboss.org&gt;<br/>
<b>Betreff:</b>&nbsp;Re: [rules-users] Fusion CEP Design problem / Race Condition</div>

<div name="quoted-content">The test (as you describe it) isn&#39;t really reproducing what will<br/>
happen in reality. A burst of 5000 events (almost) at the same time<br/>
followed by a lull of 5sec isn&#39;t quite like a scenario of 25-50k per<br/>
minute.<br/>
<br/>
The Alarm tied to some eventValue is OK. But I&#39;d try and accumulate<br/>
the matching events &quot;manually&quot; into a list kept in the Alarm fact, and<br/>
I&#39;d even try and do the retraction by comparing the timestamp of the<br/>
oldest with the timestamp of a new arrival. You can easily handle the<br/>
situation when 30 is reached. (You may have to decide when this is<br/>
retriggered, i.e., the count falls below 30 and then exceeds 30 once<br/>
more.)<br/>
<br/>
A little consideration should also be given to the number of different<br/>
eventValues. If these values are from a stable set, I don&#39;t see any<br/>
problems.<br/>
<br/>
-W</div>

<div name="quoted-content">&nbsp;</div>

<div name="quoted-content">&nbsp;</div>

<div name="quoted-content">&nbsp;</div>

<div name="quoted-content">
<div>_______________________________________________</div>

<div>rules-users mailing list</div>

<div><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></div>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></div>
</div>
</div>
</div></div></body></html>