w3resource

Redis Connection: ECHO message

Redis ECHO Command

Redis ECHO command is used to print the given string.

Here are some common uses and scenarios for the "ECHO" command:

  • Connection Testing: Verifies that the client can successfully communicate with the Redis server, ensuring the connection is active and working.
  • Debugging: Helps in debugging and troubleshooting by sending and receiving a simple message, confirming that data transmission is functioning correctly.
  • Script Testing: Used in scripting and automated tests to ensure that scripts and commands interact correctly with the Redis server.
  • Latency Measurement: Measures round-trip time for commands, helping to assess the latency of the Redis connection.

Syntax:

ECHO SAMPLE_STRING 

Available since

1.0.0.

Return Value

String reply

Return Value Type

String

Example:

redis 127.0.0.1:6379> ECHO "Hello World"
"Hello World"

Previous: AUTH
Next: PING



Follow us on Facebook and Twitter for latest update.