[JBoss JIRA] Created: (JBESB-1504) CBR using rules has poor performance
by Martin Vecera (JIRA)
CBR using rules has poor performance
------------------------------------
Key: JBESB-1504
URL: http://jira.jboss.com/jira/browse/JBESB-1504
Project: JBoss ESB
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Content Based Routing
Affects Versions: 4.2.1
Environment: SOA-P 4.2.0.beta1
Reporter: Martin Vecera
We have a simple performance that uses ContentBasedRouter to route XML messages:
<action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
<property name="ruleSet" value="MyESBRules-XPath.drl"/>
<property name="ruleLanguage" value="XPathLanguage.dsl"/>
<property name="ruleReload" value="true"/>
<property name="destinations">
<route-to destination-name="regular1" service-category="wiretapCategory1" service-name="regularService"/>
<route-to destination-name="regular2" service-category="wiretapCategory1" service-name="regularService"/>
<route-to destination-name="regular3" service-category="wiretapCategory1" service-name="regularService"/>
<route-to destination-name="regular4" service-category="wiretapCategory1" service-name="regularService"/>
<route-to destination-name="regular5" service-category="wiretapCategory1" service-name="regularService"/>
<route-to destination-name="regular6" service-category="wiretapCategory1" service-name="regularService"/>
<route-to destination-name="regular7" service-category="wiretapCategory1" service-name="regularService"/>
<route-to destination-name="regular8" service-category="wiretapCategory1" service-name="regularService"/>
<route-to destination-name="regular9" service-category="wiretapCategory1" service-name="regularService"/>
<route-to destination-name="regular0" service-category="wiretapCategory1" service-name="catchService"/>
</property>
</action>
I have created a rule set of 100 rules. Like this:
package com.jboss.soa.esb.routing.cbr
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageType;
expander XPathLanguage.dsl
global java.util.List destinations;
rule "ProductId1"
salience 100
when
xpathEquals "/Order/OrderLines/OrderLine/Product/@productId", "1"
then
Destination : "regular1";
end
...
rule "ProductId299"
salience 100
when
xpathEquals "/Order/OrderLines/OrderLine/Product/@productId", "299"
then
Destination : "regular0";
end
rule "Default rule"
salience 1
when
then
Destination : "regular0";
end
See https://svn.corp.jboss.com/repos/soa/trunk/qa/tests/quickstarts/performan... for the whole file.
The performance is very poor (see SOA-240 for reports). Only a tens of messages per second.
What's the problem here? Is the Rules engine really so slow? Or is it parsing the file every time a message arrives?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 10 months
[JBoss JIRA] Created: (JBESB-1153) File Gateway: Consume only a single file at a time
by Burr Sutter (JIRA)
File Gateway: Consume only a single file at a time
--------------------------------------------------
Key: JBESB-1153
URL: http://jira.jboss.com/jira/browse/JBESB-1153
Project: JBoss ESB
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Transports
Affects Versions: 4.2
Reporter: Burr Sutter
Assigned To: Mark Little
Fix For: 4.3
The current File gateway consumes files at a rate faster than the internal/native listener (typically JMS-based) and its associated action chain. This request is for a configuration property that causes the rate of consumption of the file gateway to match the underlying internal/native listener. Basically a file would not be pulled from disk until it has completely passed through the action chain.
Here are some notes related to this use case:
I have 1000+ files which are very huge in size and when all the
files are kept in the folder they are read at same time and placed in
configured JMS Queue.
- When all the files are placed in Queue there is a chance that the size
of messages in Queue may exceed and it may not accept new messages?
Or
- Sometimes the case may be like the input folder is monitored by one
person and the message processing is monitored by other person. In this
case when all the files are read at once it gives a wrong assumption
that all files are processed but where as due to some application
failure the messages may still be in queue.
Or
- Its always a good option to be able to see how many messages are still
in process in the folder rather than browsing the JMS queue and looking
for Queue depth. In this case if you look at Queue depth sometimes it
may be give you wrong count of messages as there is a chance that some
other application also put message some messages into the same queue,
when Queue is configured for application sharing.
Or
- If you want to replace a single file out of 1000+ files in the input
folder while in middle of processing the files, it will be easy if the
files are read one at a time rather going and deleting the messages from
JMS queue after they are read at once and placed in Queue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 10 months