As Ashwin said, you are mixing things a bit....
when using a topic, you only want a single concurrent consumer or you will
get duplicates. you can either change the overall JMS Config (used by all
routes) or explicitly set these on any routes in question...
rom("activemq:topic:services.global.xacml.*?maxConcurrentConsumers=1&concurrentConsumers=1").to(outputEndpoint);
")
Andrè wrote:
>
> i read this about connection pooling http://camel.apache.org/activemq.html
> and efficient handling of connections sounds great, so i did it *g* (copy
> & past)
> but.. when testing like this (see at the end of the post), my mock
> (outputEndpoint) reveices 10 messages, which has to be the consequence of
> that configuration.
>
> <property name="concurrentConsumers" value="10"/>
>
> I have to confess that i dont know what it really does, but it seems to
> connect 10 consumers which consume and also reply to that request,
>
> i thought of creating some kind thread pool, which will handle incoming
> messages; like some kind of load balancing feature, ,, so is it something
> like that and my configuration needs only to be elaboratd? , or did i
> misunderstand that thing ..
>
>
>
>
> context.addRoutes(new RouteBuilder() {
> @Override
> public void configure() throws Exception {
>
> from("activemq:topic:services.global.xacml.*").to(
> outputEndpoint);
> }
> });
>
>
> outputEndpoint.expectedBodiesReceived(getFileContent("src/main/resources/requests/request.xml"));
> XacmlAuthzService authzService = context.getRegistry().lookup(
> "Xacml_AuthZ_Service", XacmlAuthzService.class);
> String response = authzService
>
> .evalAuthzRequest(getFileContent("src/main/resources/requests/request.xml"));
> // Wait for camel/amq ..
> Thread.sleep(1000);
> assertEquals(xacmlResponse, response);
> outputEndpoint.assertIsSatisfied();
>
-----
Ben O'Day
IT Consultant -http://consulting-notes.com
--
View this message in context:
http://camel.465427.n5.nabble.com/Answer-multiplication-ConnectionPooling-Whats-that-for-tp4541717p4542448.html
Sent from the Camel - Users mailing list archive at Nabble.com.