File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -464,14 +464,25 @@ protected void configureSocket(Socket socket) throws IOException{
464464 socket .setTcpNoDelay (true );
465465 }
466466
467+ /**
468+ * Create a new broker connection
469+ * @param addrs an array of known broker addresses (hostname/port pairs) to try in order
470+ * @return an interface to the connection
471+ * @throws IOException if it encounters a problem
472+ */
473+ public Connection newConnection (Address [] addrs ) throws IOException {
474+ return newConnection (Executors .newFixedThreadPool (this .numConsumerThreads ),
475+ addrs );
476+ }
477+
467478 /**
468479 * Create a new broker connection
469480 * @param executor thread execution service for consumers on the connection
470481 * @param addrs an array of known broker addresses (hostname/port pairs) to try in order
471482 * @return an interface to the connection
472483 * @throws IOException if it encounters a problem
473484 */
474- private Connection newConnection (ExecutorService executor , Address [] addrs )
485+ public Connection newConnection (ExecutorService executor , Address [] addrs )
475486 throws IOException
476487 {
477488 IOException lastException = null ;
You can’t perform that action at this time.
0 commit comments