Skip to content

Redis Connector

The Redis connector enables writing data to Redis, an in-memory data structure store commonly used for caching, message queuing, and real-time analytics.

Connector Types:

  • RedisWriter - Write data to Redis lists

Push data to a Redis list:

{
"type": "RedisWriter",
"config": {
"endpoint": "localhost:6379",
"key": "sensor_data"
}
}
{
"type": "RedisWriter",
"config": {
"endpoint": "redis.example.com:6379",
"password": "your_redis_password",
"database": 0,
"key": "factory/sensors"
}
}
ParameterTypeRequiredDescription
endpointstringRedis server address (host:port)
keystringRedis list key to push data to
passwordstringRedis password for authentication
databaseintegerRedis database number (default: 0)

Data is serialized as JSON and pushed to the specified Redis list using RPUSH:

{
"temperature": 25.5,
"pressure": 101.3,
"timestamp": 1234567890
}

Buffer sensor data for downstream processing:

{
"type": "RedisWriter",
"config": {
"endpoint": "localhost:6379",
"key": "sensor_queue"
}
}

Write to a specific Redis database:

{
"type": "RedisWriter",
"config": {
"endpoint": "localhost:6379",
"database": 2,
"key": "production_data"
}
}

Connect to a password-protected Redis instance:

{
"type": "RedisWriter",
"config": {
"endpoint": "redis.mycompany.com:6379",
"password": "secure_password",
"key": "iot_events"
}
}

Solutions:

  • Verify endpoint address and port
  • Check network connectivity and firewall rules
  • Ensure Redis server is running
  • Verify password if authentication is enabled

Solutions:

  • Check Redis memory limits
  • Verify key name is valid
  • Ensure database number exists
  • Check Redis logs for errors
  1. Use Meaningful Keys: Organize keys with namespaces (e.g., factory/line1/sensors)
  2. Monitor List Size: Implement consumers to prevent unbounded list growth
  3. Use Appropriate Database: Separate different data types into different databases
  4. Secure Connections: Always use passwords in production environments
  • MQTT - Alternative message queue
  • MongoDB - Document database storage
  • InfluxDB - Time-series database