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



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/redis/redis-echo-message.php