* @param code Code to run on each message
*/
protected final void initialize(final Closure code) {
//noinspection OverlyComplexAnonymousInnerClass
this.core = new AsyncMessagingCore(parallelGroup.getThreadPool()) {
@Override
protected void registerError(final Throwable e) {
if (e instanceof InterruptedException) {
handleInterrupt((InterruptedException) e);
} else {