diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java b/aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java index 449fdc1ad7..54f2662713 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java @@ -837,6 +837,16 @@ public void conclude() { credentialsSupplier = new NullCredentialsSupplier(); } + + if (null == sessionMessageListener) + { + sessionMessageListener = + (correlationId, clusterSessionId, timestamp, buffer, offset, length, header) -> + { + throw new IllegalStateException( + "sessionMessageListener must be specified on AeronCluster.Context"); + }; + } } /**