camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From teikitel <>
Subject JPA consumer component is not handling multiple server concurrent polling
Date Wed, 19 Apr 2017 17:03:00 GMT

I am running the same Camel application on four different servers and JPA
camel component is not properly managing exclusive locks on polled rows.
This is how we configured our route :

    public void configure() throws Exception {
        // @formatter:off
		        + "&consumeDelete=false"
				+ "&consumeLockEntity=true"
				+ "&consumer.SkipLockedEntity=true"
				+ "&maximumResults=10"
				+ "&sharedEntityManager=true"
				+ "&joinTransaction=false"
				+ "&delay=200"
				+ "&consumer.query=select t from Toto t where t.consumed = 0")
		    .bean(totoAction, "consumeToto")
		    .process(exchange-> System.out.println(exchange.getIn().getBody()));
		// @formatter:on

Inserting 20 rows at the same time while 2 servers are running the app
causes some entities to be processed by both servers.

Do you know a nice work around to fix my problem ?

I can easily share you my sources if you need to reproduce it.

Thanks for this great framework,


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message