public Producer createProducer() throws Exception {
DockerOperation operation = configuration.getOperation();
if (operation != null && operation.canProduce()) {
return new DockerProducer(this);
} else {
throw new DockerException(operation + " is not a valid producer operation");
}
}