@Override
	protected Map<Integer, Object> transformPayload(Map<String, Map<Integer, List<Object>>> payload) throws Exception {
		Map<Integer, Object> result = new HashMap<Integer, Object>();
		for (Map<Integer, List<Object>> message : payload.values()) {
			Integer key = message.keySet().iterator().next();
			for (Object value : message.values()) {
				result.put(key, value);
			}
		}
		return result;
	}
Transform message payload to Map<Integer, Object>
where partitionIndex is the key and message payload is the value.
extensions/spring-xd-extension-kafka/src/main/java/org/springframework/integration/x/kafka/KafkaMessageTransformer.java