public void emit(T data, Map<String, Object> partitions) {
try {
ByteArrayOutputStream output = new ByteArrayOutputStream();
output.write(schemaHash);
writer.encode(data, new BinaryEncoder(output));
queueProducer.enqueue(new QueueEntry(Maps.transformValues(partitions, PARTITION_MAP_TRANSFORMER),
output.toByteArray()));
} catch (IOException e) {
throw Throwables.propagate(e);
}
}