Catch and log unexpected exceptions keyspace notification executor service

This commit is contained in:
Chris Eager
2021-08-13 10:19:51 -05:00
committed by Chris Eager
parent 27844fe692
commit 0cde06557d
2 changed files with 28 additions and 6 deletions

View File

@@ -256,8 +256,12 @@ public class ClientPresenceManager extends RedisClusterPubSubAdapter<String, Str
// At this point, we're on a Lettuce IO thread and need to dispatch to a separate thread before making
// synchronous Lettuce calls to avoid deadlocking.
keyspaceNotificationExecutorService.execute(() -> {
try {
displacePresence(channel.substring("__keyspace@0__:".length()));
remoteDisplacementMeter.mark();
} catch (final Exception e) {
log.warn("Error displacing presence", e);
}
});
}
}