Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle producer build for another port than 5552 #218

Open
Walfal opened this issue Jul 9, 2024 · 1 comment
Open

Handle producer build for another port than 5552 #218

Walfal opened this issue Jul 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Walfal
Copy link

Walfal commented Jul 9, 2024

Describe the bug

Hi,

If I set another port than 5552 on rabbitmq environment, eg. 5000, the producer builder panics. It prints a connection refused on the build(stream): Client(Io(Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }))

It seems even if the environment contains the port 5000, the builder of the producer (it's not the case for the consumer) want to connect itself with the port 5552.

We need to give anothe port than 5552 because we run integrations tests in parallel with testcontainer

Reproduction steps

  1. Launch rabbitmq with another port than 5552 for the current computer:
    docker run -it --rm --name rabbitmq -p 5000:5552 -p 15672:15672 -p 5672:5672 \ -e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS='-rabbitmq_stream advertised_host localhost' \ -e RABBITMQ_USER='user' -e RABBITMQ_PASSWORD='password' \ rabbitmq:3.13

  2. Set 5000 in the environment building it like this:
    let env = Environment::builder().port(5000).build().await.unwrap();
    Or even if putting 5000 in the default Environments variables

  3. Try to build the producer:
    let mut producer = env.env.producer().name(&reference).build(&env.stream).await.unwrap();

This panics on the unwrap() due to this error: Client(Io(Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }))

Expected behavior

The expected behavior would be to handle customs ports, building the producer with a given port in the Environment.

Additional context

No response

@Walfal Walfal added the bug Something isn't working label Jul 9, 2024
@Gsantomaggio
Copy link
Member

hi @Walfal,
Thank you for raising the issue. We will look as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants