Library always connect to 127.0.0.1?
Here's my code
let builder = Pulsar::builder(pulsar_url.clone(), TokioExecutor);
let mut producer = builder
.build()
.await?
.producer()
.with_topic(topic.clone())
.with_name(name.clone())
.build()
.await?;
And I set log level to info.
2023-01-29T14:39:57.021731Z INFO pulsar::connection_manager: Connected n°74724553-10f4-4c72-a116-56b2a89fa99e to pulsar://xxxxx.com:6650 in 429ms
2023-01-29T14:39:58.510769Z WARN pulsar::connection: retry establish connection on: [Io(Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })]
2023-01-29T14:39:58.512297Z ERROR pulsar::connection_manager: connection error, retrying connection to pulsar://127.0.0.1:6650 after 100ms
2023-01-29T14:39:58.614264Z WARN pulsar::connection: retry establish connection on: [Io(Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })]
Which connects to localhost even if I set url to a remote host.
There's no logic in the library to set different URLs. You can share more info, especially what the URL you configured is.
In addition, generally connected logged after retries. So it looks like you have multiple connections.
cc @CleverAkanoa since you're working on reconnection recently.
There's no logic in the library to set different URLs. You can share more info, especially what the URL you configured is.
The url I used is just "pulsar://xxxxx.com:6650". Than I got errors trying to connect to 127.0.0.1. When I try on the server running pulsar, this code will work, but there will also be two connection logs.
any updates for this?