//
// check if there is a flow asociated to this consumer
if (flowId != null) {
//
// get flow def
FlowDef flowDef = resourceManager.getConfiguration().getFlowDef(flowId);
//
// create flow processor
// TODO: this object must be pooled (with the sum of all consumers)
FlowProcessor flowProcessor = new BaseFlowProcessorImpl();
flowProcessor.setResourceManager(getResourceManager());