dubek/rabbitmq-dump-queue

# in password causes issues when trying to connect to RabbitMQ instance

Closed this issue · 3 comments

Having a hashtag (#) in your password causes the connection to your RabbitMQ instance fail.

-uri="amqp://test:this#password@rabbitmq.example.com:5672/vhost"

Dial: parse "amqp://test:this": invalid port ":this" after host.

Is there a way to escape the hashtag? I've tried enclosing the string in single quote or using a \ in front of the #.

Thanks.

Interesting. I need to look into the AMQP library we're using to see how to handle this.

One thing to try is to replace the hash char with its url-encoded form: %23

@johnamagee I tried this locally, and indeed URL-encoding the password characters seem to work. In your case, the command-line argument should be:

-uri="amqp://test:this%23password@rabbitmq.example.com:5672/vhost"

I hope it solves your issue.

That works! Thank you.