public ClientCnx(ClientConfigurationData conf, EventLoopGroup eventLoopGroup) { this(conf, eventLoopGroup, Commands.getCurrentProtocolVersion()); }
public static ByteBuf newConnect(String authMethodName, String authData, String libVersion, String targetBroker, String originalPrincipal, String clientAuthData, String clientAuthMethod) { return newConnect(authMethodName, authData, getCurrentProtocolVersion(), libVersion, targetBroker, originalPrincipal, clientAuthData, clientAuthMethod); }
public static ByteBuf newConnect(String authMethodName, String authData, String libVersion) { return newConnect(authMethodName, authData, getCurrentProtocolVersion(), libVersion, null /* target broker */, null /* originalPrincipal */, null /* Client Auth Data */, null /* Client Auth Method */); }
public static ByteBuf newConnect(String authMethodName, String authData, String libVersion, String targetBroker) { return newConnect(authMethodName, authData, getCurrentProtocolVersion(), libVersion, targetBroker, null, null, null); }
public static ByteBuf newConnected(int clientProtocolVersion) { CommandConnected.Builder connectedBuilder = CommandConnected.newBuilder(); connectedBuilder.setServerVersion("Pulsar Server"); // If the broker supports a newer version of the protocol, it will anyway advertise the max version that the // client supports, to avoid confusing the client. int currentProtocolVersion = getCurrentProtocolVersion(); int versionToAdvertise = Math.min(currentProtocolVersion, clientProtocolVersion); connectedBuilder.setProtocolVersion(versionToAdvertise); CommandConnected connected = connectedBuilder.build(); ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.CONNECTED).setConnected(connected)); connected.recycle(); connectedBuilder.recycle(); return res; }
public ClientCnx(ClientConfigurationData conf, EventLoopGroup eventLoopGroup) { this(conf, eventLoopGroup, Commands.getCurrentProtocolVersion()); }
public static ByteBuf newConnect(String authMethodName, String authData, String libVersion, String targetBroker, String originalPrincipal, String clientAuthData, String clientAuthMethod) { return newConnect(authMethodName, authData, getCurrentProtocolVersion(), libVersion, targetBroker, originalPrincipal, clientAuthData, clientAuthMethod); }
public static ByteBuf newConnect(String authMethodName, String authData, String libVersion) { return newConnect(authMethodName, authData, getCurrentProtocolVersion(), libVersion, null /* target broker */, null /* originalPrincipal */, null /* Client Auth Data */, null /* Client Auth Method */); }
private static int getProtocolVersionToAdvertise(CommandConnect connect) { return Math.min(connect.getProtocolVersion(), Commands.getCurrentProtocolVersion()); }
public static ByteBuf newConnect(String authMethodName, String authData, String libVersion, String targetBroker) { return newConnect(authMethodName, authData, getCurrentProtocolVersion(), libVersion, targetBroker, null, null, null); }
"[{}] Protocol version to advertise to broker is {}, clientProtocolVersion={}, proxyProtocolVersion={}", remoteAddress, protocolVersionToAdvertise, remoteEndpointProtocolVersion, Commands.getCurrentProtocolVersion());
public static ByteBuf newConnected(int clientProtocolVersion) { CommandConnected.Builder connectedBuilder = CommandConnected.newBuilder(); connectedBuilder.setServerVersion("Pulsar Server"); // If the broker supports a newer version of the protocol, it will anyway advertise the max version that the // client supports, to avoid confusing the client. int currentProtocolVersion = getCurrentProtocolVersion(); int versionToAdvertise = Math.min(currentProtocolVersion, clientProtocolVersion); connectedBuilder.setProtocolVersion(versionToAdvertise); CommandConnected connected = connectedBuilder.build(); ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.CONNECTED).setConnected(connected)); connected.recycle(); connectedBuilder.recycle(); return res; }