@Override
	public byte[] toBytes(Integer message) {
		int value = message.intValue();
		return new byte[] {
				(byte) (value >>> 24),
				(byte) (value >>> 16),
				(byte) (value >>> 8),
				(byte) value
		};
	}
A Kafka encoder / decoder used to serialize a single int, used as the kafka partition key.

@author Eric Bottard
spring-xd-messagebus-kafka/src/main/java/org/springframework/xd/dirt/integration/kafka/IntegerEncoderDecoder.java