public class AmqpCommons extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXAMPLE_CONTENT_TYPE |
static String |
EXAMPLE_ENCODING |
| Constructor and Description |
|---|
AmqpCommons() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(com.rabbitmq.client.Channel channel)
Closes
this AMQP.Connection resource without throwing an exception (an error message is logged instead) |
static MuleAmqpChannel |
createAmqpChannel(AmqpTransactionalConnection connection,
AmqpChannelManager channelManager,
org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction) |
static MuleAmqpChannel |
createAmqpChannel(AmqpTransactionalConnection connection,
AmqpChannelManager channelManager,
org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction,
QualityOfService qualityOfService) |
static MuleAmqpChannel |
declareFallbackExchangeIfNeeded(AmqpTransactionalConnection connection,
String exchangeName,
ExchangeDefinition fallbackExchangeDefinition,
org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction,
MuleAmqpChannel channel,
AmqpChannelManager channelManager,
boolean createFallbackExchange) |
static void |
evaluateMessageAck(com.rabbitmq.client.Channel channel,
AmqpMessage message,
AmqpChannelManager channelManager,
InternalAckMode ackMode,
String ackId) |
static String |
getChannelDeliveryTagId(int numberOfChannel,
String deliveryTag) |
static String |
getMessageAckId(com.rabbitmq.client.Channel channel,
long deliveryTag) |
static com.rabbitmq.client.Channel |
getOrCreateTransactedChannel(AmqpTransactionalConnection connection,
AmqpChannelManager channelManager,
Optional<com.rabbitmq.client.Channel> transactedChannel) |
static Properties |
getPropertiesFromBasicProperties(com.rabbitmq.client.AMQP.BasicProperties properties) |
static void |
releaseChannelIfNeeded(MuleAmqpChannel channel) |
static String |
resolveMessageContentType(AmqpMessage message,
String defaultType) |
static String |
resolveMessageContentType(String contentType,
String defaultType) |
static String |
resolveMessageEncoding(AmqpMessage message,
String defaultEncoding) |
static String |
resolveMessageEncoding(String contentType,
String defaultType) |
static <T> T |
resolveOverride(T configValue,
T operationValue) |
static String |
resolveReturnedMessageExchange(String returnedMessageExchangeFromConfig,
String override) |
static InternalAckMode |
toInternalAckMode(AmqpAckMode ackMode) |
public static final String EXAMPLE_ENCODING
public static final String EXAMPLE_CONTENT_TYPE
public static String resolveMessageContentType(String contentType, String defaultType)
public static String getMessageAckId(com.rabbitmq.client.Channel channel, long deliveryTag)
public static String resolveMessageEncoding(String contentType, String defaultType)
public static String getChannelDeliveryTagId(int numberOfChannel, String deliveryTag)
public static MuleAmqpChannel declareFallbackExchangeIfNeeded(AmqpTransactionalConnection connection, String exchangeName, ExchangeDefinition fallbackExchangeDefinition, org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction, MuleAmqpChannel channel, AmqpChannelManager channelManager, boolean createFallbackExchange) throws IOException
IOExceptionpublic static String resolveReturnedMessageExchange(String returnedMessageExchangeFromConfig, String override)
public static MuleAmqpChannel createAmqpChannel(AmqpTransactionalConnection connection, AmqpChannelManager channelManager, org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction) throws IOException
IOExceptionpublic static void evaluateMessageAck(com.rabbitmq.client.Channel channel,
AmqpMessage message,
AmqpChannelManager channelManager,
InternalAckMode ackMode,
String ackId)
throws IOException
IOExceptionpublic static InternalAckMode toInternalAckMode(AmqpAckMode ackMode)
public static <T> T resolveOverride(T configValue,
T operationValue)
public static MuleAmqpChannel createAmqpChannel(AmqpTransactionalConnection connection, AmqpChannelManager channelManager, org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction, QualityOfService qualityOfService) throws IOException
IOExceptionpublic static void closeQuietly(com.rabbitmq.client.Channel channel)
this AMQP.Connection resource without throwing an exception (an error message is logged instead)channel - the resource to closepublic static void releaseChannelIfNeeded(MuleAmqpChannel channel)
public static String resolveMessageContentType(AmqpMessage message, String defaultType)
public static String resolveMessageEncoding(AmqpMessage message, String defaultEncoding)
public static com.rabbitmq.client.Channel getOrCreateTransactedChannel(AmqpTransactionalConnection connection, AmqpChannelManager channelManager, Optional<com.rabbitmq.client.Channel> transactedChannel) throws IOException
IOExceptionpublic static Properties getPropertiesFromBasicProperties(com.rabbitmq.client.AMQP.BasicProperties properties)
Copyright © 2019 MuleSoft, Inc.. All rights reserved.