简体   繁体   中英

Spring DSL Solace Integration: How to set max message per poll

I am using spring, dsl, solace integration with spring boot. My application with one subscriber is able to poll approx 80 messages per second and 4 subscribers able to poll approx 125 messages per seconds. I want to process at least 500 messages per second. My JMS flow is stated below-

    public @Bean IntegrationFlow defaultJmsFlow()
{
    return IntegrationFlows.from(

            //read JMS topic
            Jms.messageDrivenChannelAdapter(this.connectionFactory).destination(this.config.getInputQueueName()).errorChannel(errorChannel()).configureListenerContainer(c ->
            {
                final DefaultMessageListenerContainer container = c.get();
                container.setSessionTransacted(true);
                container.setMaxConcurrentConsumers(10);
                container.setConcurrentConsumers(4);
            }).get())

            .channel(messageProcessingChannel()).get();
}

After reading messages I'm sending those to DirectChannel. Any special configuration need to make to increase performance of my application so that at least 500 messages per seconds gets processed.

It is strongly recommended to cache consumers when integrating Spring JMS with Solace. This way, the connection stays persistent and messages will be delivered to the consumer quickly without the overhead of unbinding, disconnecting, and reconnecting. This can be set in the DefaultMessageListenerContainer with container.setCacheLevel(3).

If you are using concurrent consumers to read messages from the same Solace queue, ensure that the Solace queue is non-exclusive. Exclusive queues will deliver messages to one active consumer and non-exclusive queues will deliver messages round robin to all consumers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM