The issue you're experiencing is likely due to the client receiving broker addresses from the Pulsar service discovery mechanism, which it then attempts to connect to directly. This behavior occurs because the client is not aware that it should only communicate through the HAProxy. To resolve this, you can configure a Pulsar proxy, which acts as a gateway for all client connections to the brokers, ensuring that all traffic is routed through the proxy rather than directly to the brokers.
According to the
Pulsar proxy documentation, the proxy can be configured to handle all client connections, which is particularly useful in environments where direct access to brokers is not feasible. You can set up the Pulsar proxy to connect to the brokers and configure the client to use the proxy's address. This setup will ensure that the client does not attempt to connect directly to the broker IPs. Additionally, ensure that the
advertisedListeners
configuration is set correctly to point to the HAProxy address, as this will inform the client of the correct endpoint to use.
Would you like more detailed guidance on setting up the Pulsar proxy or configuring the
advertisedListeners
?
Sources:
-
Pulsar proxy documentation 👍 0 button 👎 0 button 💡
Hint: Mention @runllm in the thread for followups.