Skip to content

Fix: RabbitMQ connection ignores the configured virtual host #62

Description

@SamuelGoulart

Description

getRabbitmqConnection calls setCredentials without passing virtualHost, even though RABBIT.VIRTUAL_HOST is already read from the environment. As a result, the connection always lands on the default vhost (/) instead of the one configured via RABBIT_VIRTUAL_HOST.

This fails silently: if the default vhost happens to have an exchange with the same name as the intended one, publish succeeds with no error, but the message is unroutable there and RabbitMQ drops it — the message never reaches the queue on the correct vhost.

What type of PR contains?

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🔥 Performance Improvements
  • 🧑‍💻 Code Refactor
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions