Tabnine Logo
AsyncRabbitTemplate$RabbitMessageFuture.getConfirm
Code IndexAdd Tabnine to your IDE (free)

How to use
getConfirm
method
in
org.springframework.amqp.rabbit.AsyncRabbitTemplate$RabbitMessageFuture

Best Java code snippets using org.springframework.amqp.rabbit.AsyncRabbitTemplate$RabbitMessageFuture.getConfirm (Showing top 4 results out of 315)

origin: org.springframework.integration/spring-integration-amqp

@Override
protected Object handleRequestMessage(Message<?> requestMessage) {
  org.springframework.amqp.core.Message amqpMessage = MappingUtils.mapMessage(requestMessage,
      this.messageConverter, getHeaderMapper(), getDefaultDeliveryMode(), isHeadersMappedLast());
  addDelayProperty(requestMessage, amqpMessage);
  RabbitMessageFuture future = this.template.sendAndReceive(generateExchangeName(requestMessage),
      generateRoutingKey(requestMessage), amqpMessage);
  future.addCallback(new FutureCallback(requestMessage));
  CorrelationData correlationData = generateCorrelationData(requestMessage);
  if (correlationData != null && future.getConfirm() != null) {
    future.getConfirm().addCallback(new CorrelationCallback(correlationData, future));
  }
  return null;
}
origin: spring-projects/spring-amqp

@Test
@DirtiesContext
public void testMessageWithConfirmDirect() throws Exception {
  this.asyncDirectTemplate.setEnableConfirms(true);
  RabbitMessageFuture future = this.asyncDirectTemplate
      .sendAndReceive(new SimpleMessageConverter().toMessage("sleep", new MessageProperties()));
  ListenableFuture<Boolean> confirm = future.getConfirm();
  assertNotNull(confirm);
  assertTrue(confirm.get(10, TimeUnit.SECONDS));
  checkMessageResult(future, "SLEEP");
}
origin: spring-projects/spring-amqp

@Test
@DirtiesContext
public void testMessageWithConfirm() throws Exception {
  this.asyncTemplate.setEnableConfirms(true);
  RabbitMessageFuture future = this.asyncTemplate
      .sendAndReceive(new SimpleMessageConverter().toMessage("sleep", new MessageProperties()));
  ListenableFuture<Boolean> confirm = future.getConfirm();
  assertNotNull(confirm);
  assertTrue(confirm.get(10, TimeUnit.SECONDS));
  checkMessageResult(future, "SLEEP");
}
origin: spring-projects/spring-integration

@Override
protected Object handleRequestMessage(Message<?> requestMessage) {
  org.springframework.amqp.core.Message amqpMessage = MappingUtils.mapMessage(requestMessage,
      this.messageConverter, getHeaderMapper(), getDefaultDeliveryMode(), isHeadersMappedLast());
  addDelayProperty(requestMessage, amqpMessage);
  RabbitMessageFuture future = this.template.sendAndReceive(generateExchangeName(requestMessage),
      generateRoutingKey(requestMessage), amqpMessage);
  future.addCallback(new FutureCallback(requestMessage));
  CorrelationData correlationData = generateCorrelationData(requestMessage);
  if (correlationData != null && future.getConfirm() != null) {
    future.getConfirm().addCallback(new CorrelationCallback(correlationData, future));
  }
  return null;
}
org.springframework.amqp.rabbitAsyncRabbitTemplate$RabbitMessageFuturegetConfirm

Popular methods of AsyncRabbitTemplate$RabbitMessageFuture

  • <init>
  • addCallback
  • getNackCause
  • set
  • setChannelHolder
  • setConfirm
  • startTimer

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now