@Override
    public List<Integer> getDestinationsToPublish(Object payload, DynamicOptions transportOptions) {
        String partitionKeyValue = partitionOption.getValue(transportOptions);
        int destinationId = Math.abs(partitionKeyValue.hashCode() % totalDestinationCount);

        if (activeDestinationIds.contains(destinationId)) {
            returnValue.clear();
            returnValue.add(destinationId);
            return returnValue;
        } else {
            return EMPTY_RETURN_VALUE;
        }
    }
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/PartitionedDistributionStrategy.java