Currently using camel JMS and have it listening to a queue in SQS. I'm trying to reduce the amount of empty receives. Currently have 3 per minute and would like to reduce to 1.
My bean code looks like:
@Bean(name = "jms")
@ConditionalOnClass(JmsComponent.class)
public JmsComponent jmsComponent(SQSConnectionFactory sqsConnectionFactory) {
JmsComponent jmsComponent = new JmsComponent();
jmsComponent.setConnectionFactory(sqsConnectionFactory);
return jmsComponent;
}
I have tried the following:
After doing the above I can still see 3 empty reads per minute.
There is a 20sec wait time limit on the side of SQS, so this is probably not possible.
When the wait time for the ReceiveMessage API action is greater than 0, long polling is in effect. The maximum long polling wait time is 20 seconds.
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.