if (delegate == null)
{
throw new DefaultMuleException("Obtained paging delegate cannot be null");
}
delegate = new PagingDelegateWrapper(delegate);
Producer<?> producer = new PagingDelegateProducer(delegate);
Consumer<?> consumer = new ListConsumer(producer);
event.getMessage().setPayload(new ConsumerIterator(consumer));