{"record":{"id":"2a329d4f1d64a2fa","repo":"redis/jedis","slug":"jedis-does-not-support-resp3-protocol-auto-negotia","errorCode":null,"errorMessage":"Jedis does not support RESP3 protocol auto-negotiation. Auto-negotiation will be disabled and the connection will assume RESP2. Set .autoNegotiateProtocol(false) (or use .serverDefaultProtocol()) in your config builder to silence this warning, or upgrade to RedisClient for RESP3 support.","messagePattern":"Jedis does not support RESP3 protocol auto-negotiation\\. Auto-negotiation will be disabled and the connection will assume RESP2\\. Set \\.autoNegotiateProtocol\\(false\\) \\(or use \\.serverDefaultProtocol\\(\\)\\) in your config builder to silence this warning, or upgrade to RedisClient for RESP3 support\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/main/java/redis/clients/jedis/Jedis.java","lineNumber":124,"sourceCode":"  private boolean isInWatch = false;\n  private Pipeline pipeline = null;\n  protected static final byte[][] DUMMY_ARRAY = new byte[0][];\n\n  private Pool<Jedis> dataSource = null;\n\n  /**\n   * Returns a config safe to use with the legacy {@link Jedis} class. Jedis does not support\n   * RESP3 auto-negotiation the way {@link UnifiedJedis} does — if it lets the connection send\n   * {@code HELLO 3}, it will receive RESP3-encoded replies that the legacy parsers cannot\n   * decode. When the supplied config has auto-negotiation enabled and no explicit protocol, the\n   * flag is cleared so the connection stays in legacy {@code HELLO}-less mode and a warning is\n   * emitted.\n   */\n  private static JedisClientConfig sanitize(JedisClientConfig config) {\n    if (config.getRedisProtocol() != null || !config.isAutoNegotiateProtocol()) {\n      return config;\n    }\n    logger.warn(\"Jedis does not support RESP3 protocol auto-negotiation. \"\n        + \"Auto-negotiation will be disabled and the connection will assume RESP2. \"\n        + \"Set .autoNegotiateProtocol(false) (or use .serverDefaultProtocol()) in your config \"\n        + \"builder to silence this warning, or upgrade to RedisClient for RESP3 support.\");\n    return DefaultJedisClientConfig.builder().from(config).autoNegotiateProtocol(false).build();\n  }\n\n  public Jedis() {\n    connection = new Connection();\n    commandObjects = new CommandObjects(RedisProtocol.REDIS_SERVER_DEFAULT_PROTO);\n  }\n\n  /**\n   * This constructor only accepts a URI string. {@link JedisURIHelper#isValid(java.net.URI)} can be\n   * used before this.\n   * @param url\n   */\n  public Jedis(final String url) {\n    this(URI.create(url));","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/Jedis.java#L106-L142","documentation":"The legacy Jedis client does not support RESP3, so when a config has protocol auto-negotiation enabled (default), Jedis logs this warning, disables auto-negotiation, and proceeds assuming RESP2. Behavior is unchanged for the caller; this exists to alert users who expect RESP3 features (e.g. client-side caching pushing) that they must move to RedisClient, or explicitly opt out of negotiation to silence the warning.","triggerScenarios":"Building any Jedis/JedisPool with a JedisClientConfig where getRedisProtocol() is null and isAutoNegotiateProtocol() is true — i.e. the default config path through Jedis(...).sanitize/effective.","commonSituations":"Migrating configs shared between RedisClient and legacy Jedis; enabling RESP3 features like client-side caching with legacy Jedis; copying a config from RedisClient examples into Jedis.","solutions":["If RESP3 is required, switch to RedisClient (builder-based), which supports RESP3.","If RESP2 is fine, set .autoNegotiateProtocol(false) in the builder to silence the warning.","Or set .serverDefaultProtocol() to let the server default apply without negotiation.","Verify you are not unintentionally sharing a RESP3-oriented DefaultJedisClientConfig with legacy Jedis."],"exampleFix":"// before\nJedisClientConfig cfg = DefaultJedisClientConfig.builder()\n    .host(\"localhost\").port(6379).build(); // auto-negotiate on → warning\n// after\nJedisClientConfig cfg = DefaultJedisClientConfig.builder()\n    .host(\"localhost\").port(6379)\n    .autoNegotiateProtocol(false).build(); // RESP2, silent","handlingStrategy":"validation","validationCode":"if (clientIsLegacyJedis && needsResp3Features()) {\n  throw new IllegalStateException(\"Use RedisClient for RESP3; legacy Jedis is RESP2 only\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set .autoNegotiateProtocol(false) explicitly in every JedisClientConfig to silence the warning deliberately","Use RedisClient (builder) when you need RESP3/client-side caching","Don't share RESP3-oriented configs between RedisClient and legacy Jedis","Audit configs after migrating code between client types"],"tags":["redis","resp3","protocol","configuration","deprecation"],"backgroundTag":"deprecated-api-usage","analyzedSha":"6dac31d4c224fb3257c216f3985340c6f500cdcb","analyzedAt":"2026-09-08T04:55:01.204Z","contentChangedAt":"2026-09-08T04:55:01.204Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}