@Override
    public List<Integer> getDestinationsToPublish(Object payload, DynamicOptions transportOptions) {
        if (activeDestinationIds.isEmpty()) {
            return EMPTY_RETURN_VALUE;
        }

        int currentDestinationCount = activeDestinationIds.size();
        if (destinationCount != currentDestinationCount) {
            destinationCount = currentDestinationCount;
        }

        if (!returnValue.isEmpty()) {
            returnValue.remove(0);
        }

        if (destinationCount > 0) {
            returnValue.add(activeDestinationIds.get(count++ % destinationCount));
        }

        return returnValue;
    }
This method tells the ID(s) of the destination(s) to which a given messages should be sent. There can be cases
where a given message is only sent to a specific destination(e.g., partition based) and message is sent to
multiple endpoints(e.g., broadcast)

@param payload          payload of the message
@param transportOptions Dynamic transport options of the sink
@return Set of IDs of the destination to which the event should be sent
modules/siddhi-core/src/main/java/io/siddhi/core/stream/output/sink/distributed/RoundRobinDistributionStrategy.java