JSPで、「QueueingConsumer.Delivery delivery = Consumer.nextDelivery()」に到達すると、ページの読み込みが停止します。メッセージは消費されますが、jspはロードされず、エラーも発生しません。助けてください
String QUEUE_NAME = "hello";
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(QUEUE_NAME, false, false, false, null);
out.println(" [*] Waiting for messages. To exit press CTRL+C");
QueueingConsumer consumer = new QueueingConsumer(channel);
channel.basicConsume(QUEUE_NAME, true, consumer);
while (true) {
QueueingConsumer.Delivery delivery = consumer.nextDelivery();
String message = new String(delivery.getBody());
out.println(" [x] Received '" + message + "'");
}