public void setRetryContextCache(RetryContextCache retryContextCache) { delegate.setRetryContextCache(retryContextCache); regular.setRetryContextCache(retryContextCache); }
private MethodInterceptor getStatefulInterceptor(Object target, Method method, Retryable retryable) { RetryTemplate template = createTemplate(retryable.listeners()); template.setRetryContextCache(this.retryContextCache);
public void setRetryContextCache(RetryContextCache retryContextCache) { delegate.setRetryContextCache(retryContextCache); regular.setRetryContextCache(retryContextCache); }
public void setRetryContextCache(RetryContextCache retryContextCache) { delegate.setRetryContextCache(retryContextCache); regular.setRetryContextCache(retryContextCache); }
public void setRetryContextCache(RetryContextCache retryContextCache) { delegate.setRetryContextCache(retryContextCache); regular.setRetryContextCache(retryContextCache); }
retryTemplate.setRetryContextCache(cache); fb.setRetryOperations(retryTemplate);
retryTemplate.setRetryContextCache(cache); fb.setRetryOperations(retryTemplate); fb.setMessageRecoverer(new RejectAndDontRequeueRecoverer());
retryTemplate.setRetryContextCache(cache); fb.setRetryOperations(retryTemplate); fb.setMessageRecoverer(new RejectAndDontRequeueRecoverer());
@Test public void testStatefulRetryWithNoMessageIds() throws Exception { int messageCount = 2; int txSize = 1; int failFrequency = 1; int concurrentConsumers = 1; SimpleMessageConverter messageConverter = new SimpleMessageConverter(); // There will be no key for these messages so they cannot be recovered... messageConverter.setCreateMessageIds(false); this.messageConverter = messageConverter; // Beware of context cache busting if retry policy fails... this.retryTemplate = new RetryTemplate(); this.retryTemplate.setRetryContextCache(new MapRetryContextCache(1)); // The container should have shutdown, so there are now no active consumers exception.expectMessage("expected:<1> but was:<0>"); doTestStatefulRetry(messageCount, txSize, failFrequency, concurrentConsumers); }
private MethodInterceptor getStatefulInterceptor(Object target, Method method, Retryable retryable) { RetryTemplate template = createTemplate(retryable.listeners()); template.setRetryContextCache(this.retryContextCache);