redis-field-engineering/redis-kafka-connect

EXPIRE/DEL support

IM-coding opened this issue · 2 comments

Hi! You have a great connector but lack EXPIRE support and/or DEL. Could we have one?

jruaux commented

Hi, yes that's something we can add to the sink connector. How do you foresee the usage for expire and del?

Thank you, for your reply!

Having a separate sink connector with redis.type=EXPIRE would be nice - users could set global TTL for all messages in the topic.
But adding this as a parameter to a Kafka message/header/key would be perfect and it would add more flexibility.
For example, a Kafka message with a header like expire_ttl: 1800 will set a key with a value and expire this key after 1800 s

As for DEL:
I've noticed in the documentation that there is an option to delete List, Set, Sorted Set if the value of the Kafka message is null.
I think the simplest solution would be adding this feature to String, Hash, JSON, and TimeSeries if it is possible.