New to Kestra?
Use blueprints to kickstart your first workflows.
Use a Redis List Realtime Trigger in Kestra to push events into Apache Cassandra. Build real-time, event-driven pipelines between Redis and Cassandra.
id: redis-list-realtime-trigger
namespace: company.team
tasks:
- id: insert_into_cassandra
type: io.kestra.plugin.cassandra.Query
session:
endpoints:
- hostname: localhost
port: 9042
localDatacenter: datacenter1
cql: |
INSERT INTO kestra.products (product_id, product_name, product_category, brand)
VALUES ({{ trigger.value | jq(".product_id") | first }}, '{{ trigger.value | jq(".product_name") | first }}',
'{{ trigger.value | jq(".product_category") | first }}', '{{ trigger.value | jq(".brand") | first }}')
triggers:
- id: realtime_trigger
type: io.kestra.plugin.redis.list.RealtimeTrigger
url: redis://localhost:6379/0
key: products
Stream events from a Redis List into Apache Cassandra the instant they arrive, with no polling and no batch lag. This blueprint wires a Redis List realtime trigger to a Cassandra insert so each JSON product record pushed onto a Redis key is captured and written to a Cassandra table immediately. It solves the classic ingestion gap where a fast in-memory queue produces events but you need a durable, queryable store to land them in, without standing up a bespoke consumer service.
io.kestra.plugin.redis.list.RealtimeTrigger watches the Redis List at key products on the redis://localhost:6379/0 connection and fires the flow the moment a new element is pushed (for example via LPUSH).insert_into_cassandra task (io.kestra.plugin.cassandra.Query) connects to the Cassandra endpoint on localhost:9042 in datacenter datacenter1 and runs an INSERT into kestra.products.jq expressions such as {{ trigger.value | jq(".product_id") | first }} to map product_id, product_name, product_category, and brand into table columns.jqRedis itself has no scheduler or workflow engine: it can hold a list but cannot react to pushes, retry a failed downstream write, or give you execution history. Kestra adds an event trigger that fires on each Redis push, automatic retries on transient Cassandra errors, full execution lineage and logs per event, and a declarative YAML definition you can version and review. You get the responsiveness of a streaming consumer with the observability and governance of an orchestrated flow.
redis://localhost:6379/0localhost:9042 with datacenter datacenter1kestra keyspace and products table created in CassandraThis flow connects to local Redis and Cassandra over plain connection strings and does not reference any {{ secret(...) }} values. For production, move credentials and endpoints into Kestra secrets and reference them in the trigger url and the task session.
docker run --name my-cassandra -p 9042:9042 -d cassandra.cqlsh, create the keyspace and table:create keyspace if not exists kestra with replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
use kestra;
CREATE TABLE kestra.products (product_id int, product_name text, product_category text, brand text, PRIMARY KEY (product_id));
docker run --name my-redis -p 6379:6379 -d redis.redis-cli:LPUSH products '{"product_id": 1, "product_name": "streamline turn-key systems", "product_category": "Electronics", "brand": "gomez"}'
kestra.products. Sample data is available in products.csv.jq mapping to handle a richer payload schema.