Search in sources :

Example 1 with State

use of org.apache.pulsar.client.impl.HandlerState.State in project incubator-pulsar by apache.

the class ConnectionHandler method handleConnectionError.

private Void handleConnectionError(Throwable exception) {
    log.warn("[{}] [{}] Error connecting to broker: {}", state.topic, state.getHandlerName(), exception.getMessage());
    connection.connectionFailed(new PulsarClientException(exception));
    State state = this.state.getState();
    if (state == State.Uninitialized || state == State.Connecting || state == State.Ready) {
        reconnectLater(exception);
    }
    return null;
}
Also used : State(org.apache.pulsar.client.impl.HandlerState.State) PulsarClientException(org.apache.pulsar.client.api.PulsarClientException)

Aggregations

PulsarClientException (org.apache.pulsar.client.api.PulsarClientException)1 State (org.apache.pulsar.client.impl.HandlerState.State)1