Clickhouse / RabbitMQ

37 views Asked by At

Any ideas why I keep getting cannot connect to RabbiMQ error when trying to create a RabbitMQ table

RabbitMQ is running fine and is used by our Spring Boot microservices on localhost:5672

Clickhouse is running fine and can connect using DataGrip / Flyway in our Spring Code

But the following fails

CREATE TABLE queue (
key UInt64,
value UInt64,
date DateTime
) ENGINE = RabbitMQ SETTINGS rabbitmq_host_port = 'localhost:5672',
                        rabbitmq_format = 'JSONEachRow';

With cannot connect to RABBIT_MQ message

I have added the username etc to the clickhouse config.xml

Both clickhouse and RabbitMQ are running through docker but all relevant ports that I know off are available locally i.e 5672, 15672, 8123

1

There are 1 answers

0
Slach On BEST ANSWER

Both clickhouse and RabbitMQ are running through docker

in this case you need to use rabbitmq_container_name_or_id_or_ip:5672 instead of localhost:5672

cause port forwarding in docker means forward between container and host OS, but not between containers