Reputation: 1
I'm working in a project where I'm using Apache camel with Quarkus. There is a route that is consuming messages from IBM MQ. I've initialized a JMS component globally with transacted=true. But whenever it consumes messages from the queue, I can see a visible delay of 1 to 2 seconds. I've also noticed the behavior of transaction by enabling the debug logs. It is initializing and committing for every message and that is causing the delay. My question would be
Code samples:
JMS Component intialization
@Produces
@ApplicationScoped
@DefaultBean
@Named("dbusmq")
@UnlessBuildProfile("test")
public JmsComponent configureJms(ConnectionFactory connectionFactory) {
JmsComponent jmsComponent = new JmsComponent();
jmsComponent.setConnectionFactory(connectionFactory);
jmsComponent.setTransacted(true);
return jmsComponent;
}
Route
from("dbusmq:queue:DEV.QUEUE?disableReplyTo=true")
.routeId("testMqRoute")
.log("Received Message: ${body}")
.end();
Tried setting cacheLevelName and asyncConumer settings. But couldn't see any improvement.
Upvotes: 0
Views: 75