@Override
    public void publish(Object payload, DynamicOptions transportOptions, State state)
            throws ConnectionUnavailableException {
        int errorCount = 0;
        StringBuilder errorMessages = null;
        List<Integer> destinationsToPublish = strategy.getDestinationsToPublish(payload, transportOptions);
        int destinationsToPublishSize = destinationsToPublish.size();
        if (destinationsToPublishSize == 0) {
            throw new ConnectionUnavailableException("Error on '" + siddhiAppContext.getName() + "' at Sink '" + type +
                    "' stream '" + streamDefinition.getId() + "' as no connections are available to publish data.");
        }
        for (Integer destinationId : destinationsToPublish) {
            try {
                publish(payload, transportOptions, destinationId, state);
            } catch (ConnectionUnavailableException e) {
                errorCount++;
                if (errorMessages == null) {
                    errorMessages = new StringBuilder();
                }
                errorMessages.append("[Destination ").append(destinationId).append("]:").append(e.getMessage());
            }
        }

        if (errorCount == destinationsToPublish.size()) {
            throw new ConnectionUnavailableException("Error on '" + siddhiAppContext.getName() + "'. " + errorCount +
                    "/" + destinationsToPublish.size() + " connections failed while trying to publish with following" +
                    " error messages:" + errorMessages.toString());
        }
    }
This is method contains the additional parameters which require to initialize distributed transport

@param streamDefinition                Definition of the stream this sink instance is publishing to
@param type                            Type of the transport that (e.g., TCP, JMS)
@param transportOptionHolder           Option holder for carrying options for the transport
@param sinkConfigReader                This hold the {@link Sink} extensions configuration reader for the sink
@param sinkMapper                      Hold the mapper that's used in this sink
@param mapType                         Type of the mapper
@param mapOptionHolder                 Options of the mapper
@param sinkHandler                     Sink handler to do optional processing
@param payloadElementList              The template list of the payload messages
@param mapperConfigReader              This hold the {@link Sink} extensions configuration reader for the mapper
@param streamJunction
@param siddhiAppContext                The siddhi app context
@param destinationOptionHolders        List of option holders containing the options mentioned in @destination
@param sinkAnnotation                  The annotation of the Sink
@param strategy                        Publishing strategy to be used by the distributed transport
@param supportedDynamicOptions         List of supported dynamic options
@param deploymentProperties            Service deployment properties for distributed transport sink
@param destinationDeploymentProperties Service deployment properties
modules/siddhi-core/src/main/java/io/siddhi/core/stream/output/sink/distributed/DistributedTransport.java