@Override
    public void init(StreamDefinition streamDefinition, OptionHolder transportOptionHolder,
                     OptionHolder distributionOptionHolder, List<OptionHolder> destinationOptionHolders,
                     ConfigReader configReader) {
        totalDestinationCount = destinationOptionHolders.size();
        String partitionKey = distributionOptionHolder.validateAndGetStaticValue(SiddhiConstants
                .PARTITION_KEY_FIELD_KEY);

        if (partitionKey == null || partitionKey.isEmpty()) {
            throw new SiddhiAppValidationException("PartitionKey is required for partitioned distribution " +
                    "strategy.");
        }
        try {
            int partitionKeyFieldPosition = streamDefinition.getAttributePosition(partitionKey);
            partitionOption = new Option(partitionKeyFieldPosition);
        } catch (AttributeNotExistException e) {
            throw new SiddhiAppValidationException("Could not find partition key attribute", e);
        }

    }
Initialize the Distribution strategy with the information it will require to make decisions.

@param streamDefinition         The stream attached to the sink this DistributionStrategy is used in
@param transportOptionHolder    Sink options of the sink which uses this DistributionStrategy
@param destinationOptionHolders The list of options under @destination of the relevant sink.
@param configReader             This hold the {@link PartitionedDistributionStrategy} configuration reader.
modules/siddhi-core/src/main/java/io/siddhi/core/stream/output/sink/distributed/PartitionedDistributionStrategy.java