await consumer.consumeAsync(qname, handler); // This function won't block
console.log("Register consumer successfully");
If connection error happens such as Redis connection lost and command aborted, main thread will crash, I have no idea to catch such Errors
Update
I find that ERROR Event will directly throw an Error which is an unhandled rejection, causing crash. Actually, redis client has a retry strategy, I think ERROR Event is not necessary
Version: redis-smq@7.2.3
If connection error happens such as
Redis connection lost and command aborted
, main thread will crash, I have no idea to catch such ErrorsUpdate I find that ERROR Event will directly throw an Error which is an unhandled rejection, causing crash. Actually, redis client has a retry strategy, I think ERROR Event is not necessary