-
Notifications
You must be signed in to change notification settings - Fork 587
Closed
Description
Hi, this's an SDK-using question. I am now using com.rabbitmq:amqp-client:5.14.2 in my project.
Which consume messages like this:
public void listenAndCalculate() {
Channel channel = getChannel();
try {
channel.basicConsume(PARAM_QUEUE, false, new DefaultConsumer(channel) {
@Override
public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) {
// do something...
}
} catch (IOException e) {
log.error(e.getMessage(), e);
}
}I found that the message would be only processed serially but not concurrently. I can find nothing to do but in spring, well in Spring-AMQP it provided a way like new SimpleRabbitListenerContainerFactory().setConcurrentConsumers(30);
But the problem is I don't want to use Spring things in my project, is there a way to process batch messages concurrently in one consumer?
Metadata
Metadata
Assignees
Labels
No labels