MassTransit-JS icon indicating copy to clipboard operation
MassTransit-JS copied to clipboard

Does this lib in any way support user/password to Rabbitmq?

Open petternordlanderhelo opened this issue 1 year ago • 3 comments

Is there any way to get user+password to connect? From what I can see, RabbitMqHostAddress does not include them and there is no way to enter a connection string. Is a PR required for this to be added?

petternordlanderhelo avatar Oct 29 '23 07:10 petternordlanderhelo

hey did you find a way to do it @petternordlanderhelo ?

jdponomarev avatar Nov 16 '23 00:11 jdponomarev

I used the following successfully:

const username = "<rabbitmq_username>";
const password = "<rabbitmq_password>";

const connectionString = `${username}:${password}@localhost`;
const options: HostSettings = {host: connectionString, virtualHost: "/", port: 5672};
const bus = require("masstransit-rabbitmq").default(options);

// .... rest of your code here

willemsevenster avatar Nov 16 '23 01:11 willemsevenster

@willemsevenster will try!

petter-nordlander-pi avatar Nov 16 '23 06:11 petter-nordlander-pi