Codota Logo
ConnectionFactoryUtils.registerDeliveryTag
Code IndexAdd Codota to your IDE (free)

How to use
registerDeliveryTag
method
in
org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils

Best Java code snippets using org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.registerDeliveryTag (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-amqp

ConnectionFactoryUtils.registerDeliveryTag(this.connectionFactory, this.channel,
    delivery.getEnvelope().getDeliveryTag());
origin: org.springframework.amqp/spring-rabbit

ConnectionFactoryUtils.registerDeliveryTag(this.connectionFactory, this.channel,
    delivery.getEnvelope().getDeliveryTag());
origin: spring-projects/spring-amqp

ConnectionFactoryUtils.registerDeliveryTag(getConnectionFactory(), channel, deliveryTag1);
ConnectionFactoryUtils.registerDeliveryTag(getConnectionFactory(), channel, deliveryTag2);
origin: org.springframework.amqp/spring-rabbit

ConnectionFactoryUtils.registerDeliveryTag(getConnectionFactory(), channel, deliveryTag1);
ConnectionFactoryUtils.registerDeliveryTag(getConnectionFactory(), channel, deliveryTag2);
origin: org.springframework.amqp/spring-rabbit

/**
 * Non-blocking receive.
 * @param queueName the queue to receive from.
 * @return The message, or null if none immediately available.
 * @since 1.5
 */
@Nullable
protected Message doReceiveNoWait(final String queueName) {
  Message message = execute(channel -> {
    GetResponse response = channel.basicGet(queueName, !isChannelTransacted());
    // Response can be null is the case that there is no message on the queue.
    if (response != null) {
      long deliveryTag = response.getEnvelope().getDeliveryTag();
      if (isChannelLocallyTransacted(channel)) {
        channel.basicAck(deliveryTag, false);
        channel.txCommit();
      }
      else if (isChannelTransacted()) {
        // Not locally transacted but it is transacted so it
        // could be synchronized with an external transaction
        ConnectionFactoryUtils.registerDeliveryTag(getConnectionFactory(), channel, deliveryTag);
      }
      return RabbitTemplate.this.buildMessageFromResponse(response);
    }
    return null;
  }, obtainTargetConnectionFactory(this.receiveConnectionFactorySelectorExpression, queueName));
  logReceived(message);
  return message;
}
origin: spring-projects/spring-amqp

/**
 * Non-blocking receive.
 * @param queueName the queue to receive from.
 * @return The message, or null if none immediately available.
 * @since 1.5
 */
@Nullable
protected Message doReceiveNoWait(final String queueName) {
  Message message = execute(channel -> {
    GetResponse response = channel.basicGet(queueName, !isChannelTransacted());
    // Response can be null is the case that there is no message on the queue.
    if (response != null) {
      long deliveryTag = response.getEnvelope().getDeliveryTag();
      if (isChannelLocallyTransacted(channel)) {
        channel.basicAck(deliveryTag, false);
        channel.txCommit();
      }
      else if (isChannelTransacted()) {
        // Not locally transacted but it is transacted so it
        // could be synchronized with an external transaction
        ConnectionFactoryUtils.registerDeliveryTag(getConnectionFactory(), channel, deliveryTag);
      }
      return RabbitTemplate.this.buildMessageFromResponse(response);
    }
    return null;
  }, obtainTargetConnectionFactory(this.receiveConnectionFactorySelectorExpression, queueName));
  logReceived(message);
  return message;
}
origin: org.springframework.amqp/spring-rabbit

@Override
@Nullable
public Message receive(final String queueName, final long timeoutMillis) {
  Message message = execute(channel -> {
    Delivery delivery = consumeDelivery(channel, queueName, timeoutMillis);
    if (delivery == null) {
      return null;
    }
    else {
      if (isChannelLocallyTransacted(channel)) {
        channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
        channel.txCommit();
      }
      else if (isChannelTransacted()) {
        ConnectionFactoryUtils.registerDeliveryTag(getConnectionFactory(), channel,
            delivery.getEnvelope().getDeliveryTag());
      }
      else {
        channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
      }
      return buildMessageFromDelivery(delivery);
    }
  });
  logReceived(message);
  return message;
}
origin: spring-projects/spring-amqp

@Override
@Nullable
public Message receive(final String queueName, final long timeoutMillis) {
  Message message = execute(channel -> {
    Delivery delivery = consumeDelivery(channel, queueName, timeoutMillis);
    if (delivery == null) {
      return null;
    }
    else {
      if (isChannelLocallyTransacted(channel)) {
        channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
        channel.txCommit();
      }
      else if (isChannelTransacted()) {
        ConnectionFactoryUtils.registerDeliveryTag(getConnectionFactory(), channel,
            delivery.getEnvelope().getDeliveryTag());
      }
      else {
        channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
      }
      return buildMessageFromDelivery(delivery);
    }
  });
  logReceived(message);
  return message;
}
org.springframework.amqp.rabbit.connectionConnectionFactoryUtilsregisterDeliveryTag

Popular methods of ConnectionFactoryUtils

  • bindResourceToTransaction
  • getTransactionalResourceHolder
    Obtain a RabbitMQ Channel that is synchronized with the current transaction, if any.
  • createConnection
    Create a connection with this connection factory and/or its publisher factory.
  • doGetTransactionalResourceHolder
    Obtain a RabbitMQ Channel that is synchronized with the current transaction, if any.
  • isChannelTransactional
    Determine whether the given RabbitMQ Channel is transactional, that is, bound to the current thread
  • releaseResources

Popular in Java

  • Reactive rest calls using spring rest template
  • getApplicationContext (Context)
  • getSystemService (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • JOptionPane (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
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