Codota Logo
MessageProperties.setDelay
Code IndexAdd Codota to your IDE (free)

How to use
setDelay
method
in
org.springframework.amqp.core.MessageProperties

Best Java code snippets using org.springframework.amqp.core.MessageProperties.setDelay (Showing top 9 results out of 315)

  • Common ways to obtain MessageProperties
private void myMethod () {
MessageProperties m =
  • Codota Iconnew MessageProperties()
  • Codota IconMessage message;message.getMessageProperties()
  • Smart code suggestions by Codota
}
origin: jmdhappy/xxpay-master

  public Message postProcessMessage(Message message) throws AmqpException {
    message.getMessageProperties().setDelay((int) delay);
    return message;
  }
});
origin: spring-projects/spring-integration

protected void addDelayProperty(Message<?> message, org.springframework.amqp.core.Message amqpMessage) {
  if (this.delayGenerator != null) {
    amqpMessage.getMessageProperties().setDelay(this.delayGenerator.processMessage(message));
  }
}
origin: spring-projects/spring-integration

amqpMessageProperties.setDelay(delay);
origin: org.springframework.integration/spring-integration-amqp

protected void addDelayProperty(Message<?> message, org.springframework.amqp.core.Message amqpMessage) {
  if (this.delayGenerator != null) {
    amqpMessage.getMessageProperties().setDelay(this.delayGenerator.processMessage(message));
  }
}
origin: spring-projects/spring-amqp

@Test
public void testDelayHeader() {
  MessageProperties properties = new MessageProperties();
  Integer delay = 100;
  properties.setDelay(delay);
  assertEquals(delay, properties.getHeaders().get(MessageProperties.X_DELAY));
  properties.setDelay(null);
  assertFalse(properties.getHeaders().containsKey(MessageProperties.X_DELAY));
}
origin: creactiviti/piper

@Override
public void send (String aRoutingKey, Object aMessage) {
 Assert.notNull(aRoutingKey,"routing key can't be null");
 amqpTemplate.convertAndSend(determineExchange(aRoutingKey),determineRoutingKey(aRoutingKey),aMessage, (m) -> {
  if(aMessage instanceof Retryable) {
   Retryable r = (Retryable) aMessage;
   m.getMessageProperties().setDelay((int)r.getRetryDelayMillis());
  }
  if(aMessage instanceof Prioritizable) {
   Prioritizable p = (Prioritizable) aMessage;
   m.getMessageProperties().setPriority(p.getPriority());
  }
  return m;
 });
}
origin: org.springframework.integration/spring-integration-amqp

amqpMessageProperties.setDelay(delay);
origin: spring-projects/spring-amqp

amqpMessageProperties.setDelay(delay);
origin: spring-projects/spring-amqp

template.setReceiveTimeout(10000);
template.convertAndSend(exchangeName, queue.getName(), "foo", message -> {
  message.getMessageProperties().setDelay(1000);
  return message;
});
MessageProperties properties = new MessageProperties();
properties.setDelay(500);
template.send(exchangeName, queue.getName(),
    MessageBuilder.withBody("foo".getBytes()).andProperties(properties).build());
org.springframework.amqp.coreMessagePropertiessetDelay

Javadoc

Set the x-delay header.

Popular methods of MessageProperties

  • getDeliveryTag
  • <init>
  • setHeader
  • getHeaders
  • setExpiration
  • setContentType
  • getReplyTo
  • getCorrelationId
  • getMessageId
  • getReceivedRoutingKey
  • setCorrelationId
  • setDeliveryMode
  • setCorrelationId,
  • setDeliveryMode,
  • setReplyTo,
  • getConsumerQueue,
  • getReceivedExchange,
  • getContentType,
  • getExpiration,
  • setContentEncoding,
  • setMessageId,
  • getAppId

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getExternalFilesDir (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
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