@Override
    public void initTransport(OptionHolder sinkOptionHolder, List<OptionHolder> destinationOptionHolders,
                              Map<String, String> deploymentProperties,
                              List<Map<String, String>> destinationDeploymentProperties, Annotation sinkAnnotation,
                              ConfigReader sinkConfigReader, DistributionStrategy strategy, String type,
                              SiddhiAppContext siddhiAppContext) {
        String transportType = sinkOptionHolder.validateAndGetStaticValue(SiddhiConstants.ANNOTATION_ELEMENT_TYPE);
        Extension sinkExtension = DefinitionParserHelper.constructExtension
                (streamDefinition, SiddhiConstants.ANNOTATION_SINK, transportType, sinkAnnotation, SiddhiConstants
                        .NAMESPACE_SINK);

        for (int i = 0; i < destinationOptionHolders.size(); i++) {
            OptionHolder destinationOption = destinationOptionHolders.get(i);
            Sink sink = (Sink) SiddhiClassLoader.loadExtensionImplementation(
                    sinkExtension, SinkExecutorExtensionHolder.getInstance(siddhiAppContext));
            destinationOption.merge(sinkOptionHolder);
            sink.initOnlyTransport(streamDefinition, destinationOption, sinkConfigReader, type,
                    new MultiClientConnectionCallback(transports.size(), strategy),
                    destinationDeploymentProperties.get(i), siddhiAppContext);
            if (!sink.getServiceDeploymentInfoList().isEmpty()) {
                ((ServiceDeploymentInfo) sink.getServiceDeploymentInfoList().get(0)).
                        addDeploymentProperties(deploymentProperties);
            }
            transports.add(sink);
        }
    }
This is the distributed transport to publish to multiple endpoints using client/publisher for each endpoint. There
will be a separate independent {@link Sink} instance connecting to each destination. This class interacts
with Sink interface and it does not make any assumptions on the underlying transport implementation.
modules/siddhi-core/src/main/java/io/siddhi/core/util/transport/MultiClientDistributedSink.java