Greetings, I have encountered a strange behavior with a simple camel route and I would like to ask for help of more experienced users. First, let me quickly show the route:
The relevant part: <from uri="vm:sam.logger.to.server?concurrentConsumers=10" /> <to uri="MonitoringService" /> The whole blueprint: <?xml version="1.0" encoding="UTF-8"?> <osgi:blueprint xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v 1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache. org/schema/blueprint/cxf" xmlns:osgi="http://www.osgi.org/xmlns/blueprint/v 1.0.0"> <camelContext id="TestSAMLoggerSeda-ctx" xmlns="http://camel.apache.org/ schema/blueprint" streamCache="true"> <route> <from uri="vm:sam.logger.to.server?concurrentConsumers=10" /> <to uri="MonitoringService" /> </route> </camelContext> <cxf:cxfEndpoint xmlns:tns="http://www.talend.org/esb/sam/ MonitoringService/v1" id="MonitoringService" address="http://localhost:8042/ MonitoringMock" serviceName="tns:MonitoringWebServiceService" endpointName= "tns:MonitoringWebServicePort" wsdlURL="deploy/MonitoringService.wsdl"> <cxf:properties> <osgi:entry key="dataFormat" value="PAYLOAD"/> </cxf:properties> </cxf:cxfEndpoint> </osgi:blueprint> Now the expected behavior: What I want to achieve is a queue from which 10 parallel threads are processing messages, calling the cxf endpoint. The cxf endpoint takes several seconds to answer, so I am expecting the speed of processing somewhere about 1-2 messages per second. Observed behavior: Using JMX I can see X+N inflight messages in the route, where X is the maximum number of concurrent http connections to the cxf endpoint and N is the number of concurrent users. For some reason, the workers that are waiting for the cxf endpoint to answer are not counted against the concurrentConsumers limit. Only the workers that are waiting for the connection to be established are counted against the limit of concurrentConsumers. Questions: What is the correct behavior for the route? If my configuration is incorrect, how can I achieve my target behavior? The camel version used is 2.20. If someone would be able to help me, and explain what I did wrong, I would very much appreciate it. thank you for help kind regards Miroslav Borský