Skip to content

Conversation

@bnjjj
Copy link

@bnjjj bnjjj commented Nov 14, 2025

What kind of change does this PR introduce?

Feature

What is the new behavior?

Add support of Redis as a destination. It could be pretty useful if you want to automatically replicate data for authentication like tokens in your redis storage to act as a cache and be updated automatically.

That's also one of the reason I added support with methods like map_insert, map_update or filter to let users override and filter the value before inserting/updating it in Redis.

Example:

 let redis = RedisDestination::new(args.redis_args.into(), store.clone()) .await? .filter(|_table_row, table_schema| table_schema.name.name == "accounts") .map_insert(|mut cell, table_schema, column_schema| { if table_schema.name.name == "accounts" && column_schema.name == "password" { // Do not save password in cache cell.clear(); } cell }) .map_update(|mut cell, table_schema, column_schema| { if table_schema.name.name == "accounts" && column_schema.name == "password" { // Do not save password in cache cell.clear(); } cell });

Additional context

To make tests pass I added redis in docker-compose

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
@bnjjj bnjjj requested a review from a team as a code owner November 14, 2025 20:26
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
@iambriccardo
Copy link
Contributor

Thanks a lot for your contribution.

We are currently evaluating which destinations to accept because doing so will involve additional maintenance work for the team. Hope you understand!

@bnjjj
Copy link
Author

bnjjj commented Nov 18, 2025

Of course ! That's why I didn't implement all the tests I could write ! I wanted to have feedback first. Keep me updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants