class QueueListenerImpl implements QueueListener {

    @Override
    public void onFailed(List<ExecutionMessage> messages) {
        deleteExecutionStateObjects(messages);
        ScoreEvent[] events = createFailureEvents(messages);
        if (events.length > 0) {
            try {
                eventBus.dispatch(events);
            } catch (InterruptedException e) {
                logger.error("Thread is interrupted. Ignoring... ", e);
            }
        }
    }

}