Apache camel don´t use all the dynamic queues created

Viewed 42

I'm using apache camel for consuming an IBM Mq, I use jms for that, everything is ok that works fine, but in the performance testing the api create a lot of dynamic queues but just use once, I've used a lot of properties for solve this problem but I didn't get it yet. my api use a pattern InOut so the responses are in queue in a dynamic queue, when exist a lot of them, for example my api create 50 dynamic queues, but just use 3 of them.

Here are the properties I used to solve it, but didn´t work for me: -maxConcurrentConsumers -conccurrentConsumers -threads

1 Answers

I found a solution for this and is this.

this is my consume to mq

.setHeader("CamelJmsDestinationName",
                        constant("queue:///"+queue+"?targetClient=1"))
                .to("jms://queue:" + queue
                        +"?exchangePattern=InOut"
                        +"&replyToType=Temporary"
                        +"&requestTimeout=10s"
                        +"&useMessageIDAsCorrelationID=true"
                        +"&replyToConcurrentConsumers=40"
                        +"&replyToMaxConcurrentConsumers=90"
                        +"&cacheLevelName=CACHE_CONSUMER")
                .id("idJms")

and this is the properties to connect the mq

ibm.mq.queueManager=${MQ_QUEUE_MANAGER}
ibm.mq.channel=${MQ_CHANNEL}
ibm.mq.connName=${MQ_HOST_NAME}
ibm.mq.user=${MQ_USER_NAME}
ibm.mq.additionalProperties.WMQ_SHARE_CONV_ALLOWED_YES=${MQ_SHARECNV}
ibm.mq.defaultReconnect=${MQ_RECONNECT}
# Config SSL
ibm.mq.ssl-f-i-p-s-required=false
ibm.mq.user-authentication-m-q-c-s-p=${MQ_AUTHENTICATION_MQCSP:false}
ibm.mq.tempModel=MQMODEL

the issue was in the MQ Model, the MQModel has to be shared if you are using the pattern inOut, this is because the concurrent create dynamic queues using the mqModel

enter image description here

Related