1

I have a spring boot app consuming messages from multiple Solace queues using Camel's jmsComponent. I have defined a Camel route for each queue connection and a Camel Processor for converting messages into json. There is a high volume of messages coming from the queues and my program is not able to keep up with the speed.

Route:

@Component
public class SomeRoute extends RouteBuilder {
    @Override
    public void configure() throws Exception {
        from("jms:{{queue.name}}").process("xmlToJsonProcessor")
            .to("kafka:{{topic}}?brokers={{spring.kafka.bootstrap-servers}}&securityProtocol={{spring.kafka.properties.security.protocol}}&saslMechanism={{spring.kafka.properties.sasl.mechanism}}&saslJaasConfig={{spring.kafka.properties.sasl.jaas.config}}");
    }   
}

I've been looking up how to split each route into its own thread but no luck so far. Any ideas?

itms
  • 183
  • 2
  • 14

1 Answers1

2

Why don't you increase the number of consumers for each queue?

    @Override
    public void configure() throws Exception {
        from("jms:{{queue.name}}?concurrentConsumers=10")
            .process("xmlToJsonProcessor")
            .to(".....");
    }