rabbitmq / rabbitmq-stream-go-client

A client library for RabbitMQ streams
MIT License
169 stars 20 forks source link

Hard coded dns name for consumer clients causes `getting_started.go` failure #330

Closed chicco785 closed 3 months ago

chicco785 commented 3 months ago

Describe the bug

Despite in the environment localhost is set:

    env, err := stream.NewEnvironment(
        stream.NewEnvironmentOptions().
            SetHost("localhost").
            SetPort(5552).
            SetUser("guest").
            SetPassword("guest"))

getting_started.go fails during the consumption because it tries to connect to rabbitmq:

  message [hello_world_9998] stored 
  message [hello_world_9999] stored 
  lookup rabbitmq: no such host exit status 1

Reproduction steps

  1. launch a docker stack with rabbitmq and streams
  2. go run getting_started.go

Expected behavior

No hard coded hostnames :) examples work just fine ;)

Additional context

No response

chicco785 commented 3 months ago

it's my docker configuration the issue