Skip to content

Is it possible to expire listeners? #58

@GitProdEnv

Description

@GitProdEnv

I want to use node-redis-pubsub in conjunction with websockets. Is it possible that the listeners expire after a defined period?

My usecase:
At the websocket server on each socket connection a unique token specified for that client will create some event listeners. These listeners listening on that token should be removed after a specified period.
Is it possible to add a expiration time? I don't want to have an increased amount of listeners stored for eternity, that never get executed, maybe due to a crash of my server instance.

This package is fairly new to me , but I know you can add an 'EX' (expiration time) to node-redis.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions