Prometheus and Grafana dashboard for monitoring RabbitMQ

This commit is contained in:
2024-11-23 00:05:22 +02:00
parent 64dbc34a13
commit 7654a92e28
7 changed files with 463 additions and 4 deletions

View File

@@ -42,12 +42,15 @@ public class BrokerConnector {
DeliverCallback deliverCallback = (consumerTag, delivery) -> {
String message = new String(delivery.getBody(), StandardCharsets.UTF_8);
System.out.println("Received: " + message);
// System.out.println("Received: " + message);
channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
};
channel.basicConsume(QUEUE_NAME, true, deliverCallback, consumerTag -> {});
channel.basicConsume(QUEUE_NAME, false, deliverCallback, consumerTag -> {});
Thread.currentThread().join();
}
}
}