@Override
    public final void publish(Object payload) {
        if (mapperLatencyTracker != null && Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) {
            mapperLatencyTracker.markOut();
        }
        DynamicOptions dynamicOptions = trpDynamicOptions.get();
        if (isConnected()) {
            S state = stateHolder.getState();
            try {
                publish(payload, dynamicOptions, state);
                if (throughputTracker != null && Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) {
                    throughputTracker.eventIn();
                }
            } catch (ConnectionUnavailableException e) {
                setConnected(false);
                if (connectionCallback != null) {
                    connectionCallback.connectionFailed();
                }
                if (!isTryingToConnect.getAndSet(true)) {
                    try {
                        connectAndPublish(payload, dynamicOptions, state);
                        isTryingToConnect.set(false);
                    } catch (ConnectionUnavailableException e1) {
                        isTryingToConnect.set(false);
                        onError(payload, dynamicOptions, e);
                    }
                } else {
                    onError(payload, dynamicOptions, e);
                }
            } finally {
                stateHolder.returnState(state);
            }
        } else if (!isShutdown.get()) {
            onError(payload, dynamicOptions, new ConnectionUnavailableException(
                    "Connection unavailable at Sink '" + type + "' at '" + streamDefinition.getId() +
                            "'. Connection retrying is in progress from a different thread"));
        }
    }
Will be called for initialing the {@link Sink}

@param outputStreamDefinition containing stream definition bind to the {@link Sink}
@param optionHolder           Option holder containing static and dynamic options related to the {@link Sink}
@param sinkConfigReader       this hold the {@link Sink} extensions configuration reader.
@param siddhiAppContext       {@link SiddhiAppContext} of the parent siddhi app.
modules/siddhi-core/src/main/java/io/siddhi/core/stream/output/sink/Sink.java