public void shutdown() {
        isShutdown.set(true);
        disconnect();
        destroy();
        setConnected(false);
        isTryingToConnect.set(false);
        if (connectionCallback != null) {
            connectionCallback.connectionFailed();
        }
    }
Called at the end to clean all the resources consumed
modules/siddhi-core/src/main/java/io/siddhi/core/stream/output/sink/Sink.java