Codota Logo
StatefulRetryOperationsInterceptorFactoryBean.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.springframework.amqp.rabbit.config.StatefulRetryOperationsInterceptorFactoryBean
constructor

Best Java code snippets using org.springframework.amqp.rabbit.config.StatefulRetryOperationsInterceptorFactoryBean.<init> (Showing top 8 results out of 315)

  • Common ways to obtain StatefulRetryOperationsInterceptorFactoryBean
private void myMethod () {
StatefulRetryOperationsInterceptorFactoryBean s =
  • Codota Iconnew StatefulRetryOperationsInterceptorFactoryBean()
  • Smart code suggestions by Codota
}
origin: com.bluelock/camel-spring-amqp

/**
 * Do not have Spring AMQP re-try messages upon failure, leave it to Camel
 * @return An advice chain populated with a NeverRetryPolicy
 */
public final Advice[] getAdviceChain() {
  RetryTemplate retryRule = new RetryTemplate();
  retryRule.setRetryPolicy(new NeverRetryPolicy());
  
  StatefulRetryOperationsInterceptorFactoryBean retryOperation = new StatefulRetryOperationsInterceptorFactoryBean();
  retryOperation.setRetryOperations(retryRule);
  retryOperation.setMessageKeyGenerator(new DefaultKeyGenerator());
  
  return new Advice[] { retryOperation.getObject() };
}
origin: Bluelock/camel-spring-amqp

/**
 * Do not have Spring AMQP re-try messages upon failure, leave it to Camel
 * @return An advice chain populated with a NeverRetryPolicy
 */
public final Advice[] getAdviceChain() {
  RetryTemplate retryRule = new RetryTemplate();
  retryRule.setRetryPolicy(new NeverRetryPolicy());
  
  StatefulRetryOperationsInterceptorFactoryBean retryOperation = new StatefulRetryOperationsInterceptorFactoryBean();
  retryOperation.setRetryOperations(retryRule);
  retryOperation.setMessageKeyGenerator(new DefaultKeyGenerator());
  
  return new Advice[] { retryOperation.getObject() };
}
origin: spring-projects/spring-amqp

private Advice createRetryInterceptor(final CountDownLatch latch, boolean stateful) throws Exception {
  AbstractRetryOperationsInterceptorFactoryBean factory;
  if (stateful) {
    factory = new StatefulRetryOperationsInterceptorFactoryBean();
  }
  else {
    factory = new StatelessRetryOperationsInterceptorFactoryBean();
  }
  factory.setMessageRecoverer((message, cause) -> {
    logger.warn("Recovered: [" + SerializationUtils.deserialize(message.getBody()).toString() +
        "], message: " + message);
    latch.countDown();
  });
  if (retryTemplate == null) {
    retryTemplate = new RetryTemplate();
  }
  factory.setRetryOperations(retryTemplate);
  return factory.getObject();
}
origin: com.dell.cpsd/common-rabbitmq

public DefaultRetryPolicyAdvice(MessageRecoverer messageRecoverer, RetryPolicy retryPolicy)
{
  RetryTemplate retryTemplate = new RetryTemplate();
  retryTemplate.setBackOffPolicy(createBackOffPolicy());
  retryTemplate.setRetryPolicy(retryPolicy);
  retryTemplate.registerListener(new RetryErrorListener());
  StatefulRetryOperationsInterceptorFactoryBean factory = new StatefulRetryOperationsInterceptorFactoryBean();
  factory.setRetryOperations(retryTemplate);
  factory.setMessageKeyGenerator(new DefaultMessageKeyGenerator());
  factory.setMessageRecoverer(messageRecoverer);
  this.delegate = factory.getObject();
}
origin: spring-projects/spring-amqp

container.setQueueNames("retry.test.queue");
StatefulRetryOperationsInterceptorFactoryBean fb = new StatefulRetryOperationsInterceptorFactoryBean();
origin: com.dell.cpsd.common.messaging/common-rabbitmq

public DefaultRetryPolicyAdvice(MessageRecoverer messageRecoverer, RetryPolicy retryPolicy)
{
  RetryTemplate retryTemplate = new RetryTemplate();
  retryTemplate.setBackOffPolicy(createBackOffPolicy());
  retryTemplate.setRetryPolicy(retryPolicy);
  retryTemplate.registerListener(new RetryErrorListener());
  StatefulRetryOperationsInterceptorFactoryBean factory = new StatefulRetryOperationsInterceptorFactoryBean();
  factory.setRetryOperations(retryTemplate);
  factory.setMessageKeyGenerator(new DefaultMessageKeyGenerator());
  factory.setMessageRecoverer(messageRecoverer);
  this.delegate = factory.getObject();
}
origin: spring-projects/spring-amqp

container.setQueueNames("retry.test.queue");
StatefulRetryOperationsInterceptorFactoryBean fb = new StatefulRetryOperationsInterceptorFactoryBean();
origin: spring-projects/spring-amqp

container.setQueueNames("retry.test.queue");
StatefulRetryOperationsInterceptorFactoryBean fb = new StatefulRetryOperationsInterceptorFactoryBean();
org.springframework.amqp.rabbit.configStatefulRetryOperationsInterceptorFactoryBean<init>

Popular methods of StatefulRetryOperationsInterceptorFactoryBean

  • getObject
  • setMessageKeyGenerator
  • setRetryOperations
  • setMessageRecoverer
  • getMessageRecoverer
  • getRetryOperations
  • setNewMessageIdentifier

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now