упаковал всё в docker-compose

This commit is contained in:
2025-04-15 20:50:01 +03:00
parent 9312ec1f2d
commit 3245ffa10f
6 changed files with 64 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ public class Send {
public static void main(String[] args) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
factory.setHost("rabbitmq");
try (Connection connection = factory.newConnection();
Channel channel = connection.createChannel()) {
channel.queueDeclare(QUEUE_NAME, false, false, false, null);