Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

Rustls example won't work with RabbitMQ in Docker #2

Closed
@Relrin

Description

@Relrin

Hello!

I'm trying to run the following example on my local machine with a RabbitMQ instance. So, the connection URI in my case was slightly changed, to amqps://user:pass@192.168.99.100:5672/?heartbeat=10 instead, but instead of getting a couple of println!, I'm getting the error in a console:

=> cargo run --
   Compiling test-rabbitmq v0.1.0 (file:///Users/valeryisavich/code/test-lapin-rabbitmq)
    Finished dev [unoptimized + debuginfo] target(s) in 4.44 secs
     Running `target/debug/test-lapin-rabbitmq`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 61, message: "Connection refused" } }', src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Also I'd tried to change the amqps to ampq, but result is the same.
Do you have any ideas how to fix this error, so that it will work?

Docker-compose configuration:

version: "3"

services:
  rabbitmq:
    image: bitnami/rabbitmq:latest
    ports:
      - 5672:5672
      - 15672:15672
    environment:
      - RABBITMQ_USERNAME=user
      - RABBITMQ_PASSWORD=pass

Cargo.toml file in test project:

[package]
name = "test-lapin-rabbitmq"
version = "0.1.0"

[dependencies]
chrono = "0.4.0"
futures = "0.1.17"
lapin-futures = "0.10"
lapin-futures-rustls = "0.10.0"
lapin-futures-tls-api = "0.6.0"
tls-api-stub = "0.1.12"
tokio-core = "0.1.10"
rustls = "0.11.0"
tokio-rustls = "0.4.0"
env_logger = "0.4.3"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions