Created
November 13, 2019 17:22
-
-
Save stefanotroia/bf6f9d48c27bb062374100a38d1b468e to your computer and use it in GitHub Desktop.
Rabbit consume with threads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ListeningExecutorService service = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(10)); | |
@RabbitListener(queues = {DEMO}) | |
public void consumeMessages(Message message) { | |
service.submit(()-> {this.consumeMessage(strMsg);}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment