Prepare to receive client events about persisted messages

This commit is contained in:
Jon Chambers
2024-11-06 14:29:40 -05:00
committed by Jon Chambers
parent 9d19fc9ecc
commit 96a4d4c8ac
5 changed files with 31 additions and 3 deletions

View File

@@ -16,6 +16,11 @@ public interface ClientEventListener {
*/
void handleNewMessageAvailable();
/**
* Indicates that messages for the client have been persisted from short-term storage to long-term storage.
*/
void handleMessagesPersistedPubSub();
/**
* Indicates that the client's presence has been displaced and the listener should close the client's underlying
* network connection.

View File

@@ -347,6 +347,8 @@ public class PubSubClientEventManager extends RedisClusterPubSubAdapter<byte[],
case DISCONNECT_REQUESTED -> listenerEventExecutor.execute(() -> listener.handleConnectionDisplaced(false));
case MESSAGES_PERSISTED -> listenerEventExecutor.execute(listener::handleMessagesPersistedPubSub);
default -> logger.warn("Unexpected client event type: {}", clientEvent.getClass());
}
} else {