}
private void delayOrFail(final Message message, final Runnable deliveryTaskRunnable) {
if (message.isFlagSet(RoutingFlag.RetryDelivery)
&& message.getResource(Integer.class, Resources.RetryAttempts.name()) > 3) {
final NoSubscribersToDeliverTo ntdt = new NoSubscribersToDeliverTo(message.getSubject());
if (message.getErrorCallback() != null) {
message.getErrorCallback().error(message, ntdt);
}
throw ntdt;
}