#avoid blocking the EventLoop in Pub/Sub subscriber

2 messages · Page 1 of 1 (latest)

signal sandal
#

Hi, I seem to be blocking the EventLoop and that is a no-no in https://github.com/lettuce-io/lettuce-core/wiki/Frequently-Asked-Questions.

Basically, my RedisPubSubListener is doing some business login on every message that comes in. Part of that logic is to synchronously a message into a websocket session (that I think it's a pretty fast operation).

From what I understand, I should avoid doing this.
If so, how should I delegate this logic? Should I spawn a thread to perform these sync operations to avoid stopping the RedisPubSubListener::message call?

novel prairie
#

sounds like a task for a background daemon.