Prem
Prem

Reputation: 31

Redis setEX Expired Event Triggering Multiple Times Despite Unsubscribe/Resubscribe

Problem:

In a Redis setup, utilizing setEX to set a key with an expiration time, I've encountered an issue where the expired event is triggered multiple times for the same key if the channel is subscribed to multiple times. Despite attempting to mitigate this by unsubscribing and then resubscribing to the channel, the expired event still occasionally fires twice.

Details:

Expected Behavior:

The expired event should only be triggered once, regardless of how many times the channel is subscribed to.

Additional Information:

Upvotes: 0

Views: 69

Answers (0)

Related Questions