Overview
This node allows publishing messages to a Redis channel. It is useful in scenarios where you want to send real-time notifications or messages to subscribers listening on a specific Redis channel. For example, it can be used to broadcast updates in a chat application or trigger events in distributed systems.
Use Case Examples
- Publishing a JSON message to a Redis channel to notify other services about a status update.
- Sending a plain text message to a Redis channel for real-time chat applications.
Properties
| Name | Meaning |
|---|---|
| Connection Mode | How to manage Redis connections, either by reusing connections for better performance or creating a new connection each time for safety. |
| Channel | The name of the Redis channel to which the message will be published. |
| Data | The message data to publish to the Redis channel. |
Output
JSON
json- The output contains the original input data for each published message, confirming the publish operation.
Dependencies
- Requires a Redis server connection with appropriate credentials (an API key credential for Redis).
Troubleshooting
- Common issues include failure to connect to the Redis server due to incorrect credentials or network issues. The node throws an error if it fails to establish a Redis connection.
- If publishing fails, the node may throw errors related to invalid channel names or message data. Ensure the channel name is a non-empty string and the message data is properly formatted.
- Connection mode 'Direct' creates a new connection each time, which is safer but slower; 'Pooled' mode reuses connections but may cause issues if connections are dropped unexpectedly.