I'm using RabbitMQ in my spring boot application in this way:
Sender:
rabbitTemplate.convertAndSend("exchange", "routingKey", "Message Text");
Listener:
@RabbitListener(queues = "queueName")
public void receive(String message) {
System.out.println("start");
//send an http request that takes for example 4 seconds
System.out.println("end");
}
With above codes, when application executes sender part, receive method invoked. My problem is while receive method is processing a message, if sender part put another message into queue, the method does not proccess new message and so second start word wont be printed until end word of previous message. In the other words, I want to know, how a message listener can proccess multiple messages at a time I don't know what is the problem.