Hi Regunath,My project uses various services which are communicating by RabbitMQ. We have a mule configuration which contains a RabbitMQ connector for each service's endpoint.I am currently working on the performance improvement POC and I am trying to get an acknowledgement by configuring the autoAck property in the mule-config.xml. The next step in the process will be to increasethe preFetch count to a higher value. I went through your writeup on thelink https://github.com/regunathb/Trooper/wiki/RabbitMQ-Mule-Connector and came across your mail id.I am not able to find the associated property even on various links returned by Google Search. It will be great if you can assist me with it.Thanks in Advance.Regards,Amal
Hi Amal,I would recommend joining and writing to the trooper-users mailing list so that it gets seen by the dev group.I am afraid I did not get to understand your problem statement correctly and therefore have these questions:1) What is this performance improvement POC? What are you trying to achieve and how did you come up with the idea of configuring the "autoAck" property?
We had observed that the throughput of the services that we had developed was below expectations. So when analysing the possible points where the performance can be tweaked, the throughput by the queues was a possible touchpoint. I started to dig deep into the Rabbit MQ and came to know about these parameters. Now, for the POC, me and my colleague had tried the following since yesterday till today
- Develop Rabbit MQ Producers and consumer in a Java Application and monitor on the RabbitMQ console the way the queues behave. To ease the process of monitoring, we had kept a sleep time of 1000ms in the Consumer and monitored it on the Rabbit MQ Management Console.
- When the autoAck parameter was true, the count was not displayed in the Unacknowledged messages. When set to false, the count was being displayed.
- Our point of view was that by increasing the preFetch count, it can be possible to set the count of messages being consumed per fetch, but to monitor whether the messages are actually picked up as per our expectation, we wanted to set the pre-fetch count.
2) All message consumption by the RabbitMQ connector by default is in autoAck mode i.e. messages are acked as soon as they are picked up from the queue. Acking can be delayed to post component processing of the message by setting the endpoint as "synchronous" - for e.g. <inbound-endpoint ref="GreetingInputEndpoint" synchronous="true" transformer-refs="EarthlingToGreetingServiceRequest"/>. This is just FYI and is not what you probably want to do.
Yes Regu, this is not what we intended, we only intended to monitor in the RabbitMQ Management Console whether the messages produced are actually being consumed. Thanks for this info anyways, I'll keep this in my records. The code I was trying this evening was <spring:property name=autoAck value="false"/> inside the<rabbitmq:connector name="TestRabbitMQConnector">. . .</rabbitmq:connector>
3) Regarding prefetch count, it is not set to any value by default and therefore quite high already. You can set a very high value like say 10000 if your application can afford to have large JVM heap.
I was not aware of this (highlighted) part. I will try this with multiple values and will keep you posted in case I have a doubt or come across anything important.
Correcting a typo in sub point 3 of point 1 below
" .... we wanted to set the autoAck to false"