You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to issue mentioned in the thread : #416
Hi, I am facing the same issue in the above thread with amqp.Dial, if the username or password has "#" symbol, then the split happen at # internally in the Dial code. Can someone please help how to resolve this. I tried even query escape but no luck.
Code inside amqp Dial method : url.Parse splits at # and it is causing the invalidPort error.
func Parse(rawURL string) (*URL, error) {
// Cut off #frag
u, frag := split(rawURL, '#', true)
Below is the code snippet
func connectToRMQServer() {
fmt.Println("Connection staretd ")
rmqurl := "amqp://guest:" + url.QueryEscape("guest#") + "@localhost:5672/"
fmt.Println("rmqurl ", rmqurl)
conn, err := amqp.Dial(rmqurl)
if err != nil {
fmt.Println("Error is ", "Failed to connect to RabbitMQ", err)
return
}
fmt.Println("Connection succesful ", conn)
}
func main() {
fmt.Println("in main")
connectToRMQServer()
}
The text was updated successfully, but these errors were encountered:
Similar to issue mentioned in the thread : #416
Hi, I am facing the same issue in the above thread with amqp.Dial, if the username or password has "#" symbol, then the split happen at # internally in the Dial code. Can someone please help how to resolve this. I tried even query escape but no luck.
Code inside amqp Dial method : url.Parse splits at # and it is causing the invalidPort error.
func Parse(rawURL string) (*URL, error) {
// Cut off #frag
u, frag := split(rawURL, '#', true)
Below is the code snippet
func connectToRMQServer() {
fmt.Println("Connection staretd ")
rmqurl := "amqp://guest:" + url.QueryEscape("guest#") + "@localhost:5672/"
fmt.Println("rmqurl ", rmqurl)
conn, err := amqp.Dial(rmqurl)
if err != nil {
fmt.Println("Error is ", "Failed to connect to RabbitMQ", err)
return
}
fmt.Println("Connection succesful ", conn)
}
func main() {
fmt.Println("in main")
connectToRMQServer()
}
The text was updated successfully, but these errors were encountered: