code: private ConsumerConfig getConsumerConfig(BasicFlowletContext flowletContext, Method method) {
      // Determine input queue partition type
      HashPartition hashPartition = method.getAnnotation(HashPartition.class);
      RoundRobin roundRobin = method.getAnnotation(RoundRobin.class);
      DequeueStrategy strategy = DequeueStrategy.FIFO;
      String hashKey = null;
  
      Preconditions.checkArgument(!(hashPartition != null && roundRobin != null),
                                  "Only one strategy allowed for process() method: %s", method.getName());
  
      if (hashPartition != null) {
        strategy = DequeueStrategy.HASH;
        hashKey = hashPartition.value();
        Preconditions.checkArgument(!hashKey.isEmpty(), "Partition key cannot be empty: %s", method.getName());
      } else if (roundRobin != null) {
        strategy = DequeueStrategy.ROUND_ROBIN;
      }
  
      return new ConsumerConfig(flowletContext.getGroupId(), flowletContext.getInstanceId(),
                                flowletContext.getInstanceCount(), strategy, hashKey);
    }
docs: Creates a {@link ConsumerConfig} based on the method annotation and the flowlet context.
  @param flowletContext Runtime context of the flowlet.
  @param method The process method to inspect.
  @return A new instance of {@link ConsumerConfig}.