@@ -187,15 +187,49 @@ class PULSAR_PUBLIC ClientConfiguration {
187187 int getMaxBackoffIntervalMs () const ;
188188
189189 /* *
190- * Configure a custom logger backend to route of Pulsar client library
190+ * Configure whether to send authentication credentials when following HTTP redirects
191+ * to a different host during lookup requests.
192+ *
193+ * When enabled, the Authorization header will be forwarded on cross-origin redirects.
194+ *
195+ * HTTP lookup redirects typically occur when the broker receiving the lookup request
196+ * is not the owner of the requested topic. In this case, the broker responds with
197+ * an HTTP redirect (3xx) pointing to the correct owner broker. If authentication is
198+ * enabled, the redirected request needs to carry the auth credentials to be accepted
199+ * by the target broker.
200+ *
201+ * If this option is not enabled and the cluster has authentication enabled, the
202+ * redirected request will not carry credentials, which may result in a 401
203+ * Unauthorized error from the target broker.
204+ *
205+ * The default value is false.
206+ *
207+ * @param allow whether to allow sending auth credentials on redirects
208+ */
209+ ClientConfiguration& setHttpLookupAuthAllowRedirect (bool allow);
210+
211+ /* *
212+ * @return whether auth credentials are sent on HTTP redirects
213+ */
214+ bool isHttpLookupAuthAllowRedirect () const ;
215+
216+ /* *
217+ * Configure a custom logger backend to route Pulsar client library logs
191218 * to a different logger implementation.
192219 *
193220 * By default, log messages are printed on standard output.
194221 *
195222 * When passed in, the configuration takes ownership of the loggerFactory object.
196- * The logger factory can only be set once per process. Any subsequent calls to
197- * set the logger factory will have no effect, though the logger factory object
198- * will be cleaned up.
223+ * The logger factory is process-wide and is not scoped to a Client instance.
224+ * It can only be set once per process. Any subsequent calls to set the logger
225+ * factory will have no effect, though the logger factory object will be
226+ * cleaned up.
227+ *
228+ * Applications and language bindings that use callback-based logger factories
229+ * should set the logger before creating clients and ensure callback state
230+ * outlives all Pulsar clients and background threads that can emit logs.
231+ * Avoid using per-client callback objects that can be destroyed while another
232+ * client in the same process is still running.
199233 */
200234 ClientConfiguration& setLogger (LoggerFactory* loggerFactory);
201235
0 commit comments