@Override public RetryOperationsInterceptor build() { if (this.recoverer != null) { this.interceptor.setRecoverer(this.recoverer); } if (this.retryOperations != null) { this.interceptor.setRetryOperations(this.retryOperations); } else { this.interceptor.setRetryOperations(this.retryTemplate); } if (this.label != null) { this.interceptor.setLabel(this.label); } return this.interceptor; }
@Override public RetryOperationsInterceptor build() { if (this.recoverer != null) { this.interceptor.setRecoverer(this.recoverer); } if (this.retryOperations != null) { this.interceptor.setRetryOperations(this.retryOperations); } else { this.interceptor.setRetryOperations(this.retryTemplate); } if (this.label != null) { this.interceptor.setLabel(this.label); } return this.interceptor; }
@Override public RetryOperationsInterceptor getObject() { RetryOperationsInterceptor retryInterceptor = new RetryOperationsInterceptor(); RetryOperations retryTemplate = getRetryOperations(); if (retryTemplate == null) { retryTemplate = new RetryTemplate(); } retryInterceptor.setRetryOperations(retryTemplate); final MessageRecoverer messageRecoverer = getMessageRecoverer(); retryInterceptor.setRecoverer((args, cause) -> { Message message = (Message) args[1]; if (messageRecoverer == null) { logger.warn("Message dropped on recovery: " + message, cause); } else { messageRecoverer.recover(message, cause); } return null; }); return retryInterceptor; }
@Override public RetryOperationsInterceptor getObject() { RetryOperationsInterceptor retryInterceptor = new RetryOperationsInterceptor(); RetryOperations retryTemplate = getRetryOperations(); if (retryTemplate == null) { retryTemplate = new RetryTemplate(); } retryInterceptor.setRetryOperations(retryTemplate); final MessageRecoverer messageRecoverer = getMessageRecoverer(); retryInterceptor.setRecoverer((args, cause) -> { Message message = (Message) args[1]; if (messageRecoverer == null) { logger.warn("Message dropped on recovery: " + message, cause); } else { messageRecoverer.recover(message, cause); } return null; }); return retryInterceptor; }