Skip to content

Commit

Permalink
Log terminate in finest when the client is closing
Browse files Browse the repository at this point in the history
ReliableTopicMessageListener should not warn the user when
the client is shutting down. InstanceNotActiveException is
already in finest. This pr makes ClientNotActiveException log level
finest too.

fixes #17070
  • Loading branch information
sancar committed Jul 2, 2020
1 parent bc69237 commit 80da5e7
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -16,6 +16,7 @@

package com.hazelcast.client.impl.proxy;

import com.hazelcast.client.HazelcastClientNotActiveException;
import com.hazelcast.client.HazelcastClientOfflineException;
import com.hazelcast.cluster.Member;
import com.hazelcast.cluster.impl.MemberImpl;
Expand Down Expand Up @@ -64,7 +65,13 @@ protected Member getMember(ReliableTopicMessage m) {

@Override
protected boolean handleInternalException(Throwable t) {
if (t instanceof HazelcastClientOfflineException) {
if (t instanceof HazelcastClientNotActiveException) {
if (logger.isFinestEnabled()) {
logger.finest("Terminating MessageListener " + listener + " on topic: " + topicName + ". "
+ " Reason: HazelcastClient is shutting down");
}
return false;
} else if (t instanceof HazelcastClientOfflineException) {
if (logger.isFinestEnabled()) {
logger.finest("MessageListener " + listener + " on topic: " + topicName + " got exception: " + t
+ ". Continuing from last known sequence: " + sequence);
Expand Down

0 comments on commit 80da5e7

Please sign in to comment.