Skip to content

CLIENT

Manages client connection properties.

CLIENT <subcommand> [arguments]

Sets client library metadata on the current connection.

CLIENT SETINFO <attribute> <value>
ParameterTypeRequiredDescription
attributestringYesAttribute name: lib-name or lib-ver
valuestringYesAttribute value

Sets a human-readable name for the current connection.

CLIENT SETNAME <name>
ParameterTypeRequiredDescription
namestringYesConnection name

All subcommands return simple string OK on success.

CLIENT SETINFO stores library metadata (lib-name or lib-ver) on the session. CLIENT SETNAME sets the connection name on the session.

This command does not require the cluster to be initialized.

ERR is returned when:

  • Wrong number of arguments for the subcommand.
  • Unrecognized attribute for SETINFO (not lib-name or lib-ver).
  • Unknown subcommand.

Set library name:

127.0.0.1:5484> CLIENT SETINFO lib-name jedis
OK

Set library version:

127.0.0.1:5484> CLIENT SETINFO lib-ver 4.3.1
OK

Set connection name:

127.0.0.1:5484> CLIENT SETNAME my-app-connection
OK