Avoiding Sonarlint error efficiently in Java for infinite while loop

186 views Asked by At

I have a RabbitMQ Consumer Java application that keeps on checking for the new message on the queue with a while(true) loop.

Is there any solution so I can avoid following Sonalint Blocker bug without suppressing the error:

Loops should not be infinite

Reference : https://rules.sonarsource.com/java/RSPEC-2189

0

There are 0 answers