org.springframework.amqp.rabbit.support
Class RabbitUtils
java.lang.Object
org.springframework.amqp.rabbit.support.RabbitUtils
public abstract class RabbitUtils
- extends Object
- Author:
- Mark Fisher, Mark Pollack
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
RabbitUtils
public RabbitUtils()
closeConnection
public static void closeConnection(com.rabbitmq.client.Connection connection)
- Close the given RabbitMQ Connection and ignore any thrown exception.
This is useful for typical
finally blocks in manual RabbitMQ code.
- Parameters:
connection - the RabbitMQ Connection to close (may be null)
closeChannel
public static void closeChannel(com.rabbitmq.client.Channel channel)
- Close the given RabbitMQ Channel and ignore any thrown exception.
This is useful for typical
finally blocks in manual RabbitMQ code.
- Parameters:
channel - the RabbitMQ Channel to close (may be null)
commitIfNecessary
public static void commitIfNecessary(com.rabbitmq.client.Channel channel)
- Commit the Channel if not within a JTA transaction.
- Parameters:
channel - the RabbitMQ Channel to commit
- Throws:
IOException
IOException - if committing failed
rollbackIfNecessary
public static void rollbackIfNecessary(com.rabbitmq.client.Channel channel)
convertRabbitAccessException
public static AmqpException convertRabbitAccessException(Exception ex)
closeMessageConsumer
public static void closeMessageConsumer(com.rabbitmq.client.Channel channel,
String consumerTag)
extractBasicProperties
public static com.rabbitmq.client.AMQP.BasicProperties extractBasicProperties(Message message,
String encoding)
Copyright © 2010. All Rights Reserved.