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 06408ec commit 2d45b1b
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -16,6 +16,7 @@

package com.hazelcast.client.proxy;

import com.hazelcast.client.HazelcastClientNotActiveException;
import com.hazelcast.client.HazelcastClientOfflineException;
import com.hazelcast.core.Member;
import com.hazelcast.logging.ILogger;
Expand Down Expand Up @@ -63,7 +64,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 2d45b1b

Please sign in to comment.