Class AdvancedRabbitMqJmsImplementation
- java.lang.Object
-
- com.adaptris.core.jms.VendorImplementationImp
-
- com.adaptris.core.jms.UrlVendorImplementation
-
- com.adaptris.core.amqp.rabbitmq.BasicRabbitMqJmsImplementation
-
- com.adaptris.core.amqp.rabbitmq.AdvancedRabbitMqJmsImplementation
-
- All Implemented Interfaces:
ComponentLifecycleExtension
,ConnectionComparator<VendorImplementationBase>
,VendorImplementation
,VendorImplementationBase
public class AdvancedRabbitMqJmsImplementation extends BasicRabbitMqJmsImplementation
AMQP 0.9.1 implementation ofVendorImplementation
using RabbitMQ.All available connection factory properties are exposed. If you configure a username and password on the wrapping
JmsConnection
in which caseConnectionFactory.createConnection(String, String)
is used when creating the connection otherwiseConnectionFactory.createConnection()
will be used.The enum values from
AdvancedRabbitMqJmsImplementation.ConnectionFactoryProperty
are matched on a case insensitve basis against the keys ingetConnectionFactoryProperties()
when configuring theRMQConnectionFactory
. In the event that a key does not match one the enums, an attempt will be made to invoke (via reflection) the implied setter with the configured value (e.g.DnsServer=a.b.c.d
would causesetDnsServer("a.b.c.d")
to be invoked if it exists as a method onRMQConnectionFactory
).- Since:
- 3.6.0
In the adapter configuration file this class is aliased as rabbitmq-advanced-jms-implementation which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
AdvancedRabbitMqJmsImplementation.Applicator
static class
AdvancedRabbitMqJmsImplementation.ConnectionFactoryProperty
Connection Properties that map toRMQConnectionFactory
setters.-
Nested classes/interfaces inherited from class com.adaptris.core.amqp.rabbitmq.BasicRabbitMqJmsImplementation
BasicRabbitMqJmsImplementation.RMQDestinationBuilder
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.amqp.rabbitmq.BasicRabbitMqJmsImplementation
DEFAULT_OM_TIMEOUT
-
Fields inherited from class com.adaptris.core.jms.VendorImplementationImp
log
-
-
Constructor Summary
Constructors Constructor Description AdvancedRabbitMqJmsImplementation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BasicRabbitMqJmsImplementation.RMQDestinationBuilder
builder()
com.rabbitmq.jms.admin.RMQConnectionFactory
createConnectionFactory()
@NonNull KeyValuePairSet
getConnectionFactoryProperties()
Any additional properties that are required on theRMQConnectionFactory
.java.lang.String
getExchangeName()
IfBasicRabbitMqJmsImplementation.setAmqpMode(Boolean)
is set to true, then additionally set the exchange name as well when creating theRMQDestination
.java.lang.String
getRoutingKey()
IfBasicRabbitMqJmsImplementation.setAmqpMode(Boolean)
is set to true, then additionally set the exchange name as well when creating theRMQDestination
.void
setConnectionFactoryProperties(@NonNull KeyValuePairSet connectionFactoryProperties)
Any additional properties that are required on theRMQConnectionFactory
.void
setExchangeName(java.lang.String exchangeName)
IfBasicRabbitMqJmsImplementation.setAmqpMode(Boolean)
is set to true, then additionally set the exchange name as well when creating theRMQDestination
.void
setRoutingKey(java.lang.String routingKey)
IfBasicRabbitMqJmsImplementation.setAmqpMode(Boolean)
is set to true, then additionally set the exchange name as well when creating theRMQDestination
.-
Methods inherited from class com.adaptris.core.amqp.rabbitmq.BasicRabbitMqJmsImplementation
amqpMode, connectionEquals, createDestination, createQueue, createTopic, getAmqpMode, setAmqpMode, withAmqpMode
-
Methods inherited from class com.adaptris.core.jms.UrlVendorImplementation
getBrokerUrl, retrieveBrokerDetailsForLogging, setBrokerUrl
-
Methods inherited from class com.adaptris.core.jms.VendorImplementationImp
applyVendorSessionProperties, createConsumer, createDestination, createQueueReceiver, createSession, createTopicSubscriber, prepare
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.jms.VendorImplementation
createConnection
-
-
-
-
Method Detail
-
createConnectionFactory
public com.rabbitmq.jms.admin.RMQConnectionFactory createConnectionFactory() throws javax.jms.JMSException
- Specified by:
createConnectionFactory
in interfaceVendorImplementation
- Overrides:
createConnectionFactory
in classBasicRabbitMqJmsImplementation
- Throws:
javax.jms.JMSException
-
builder
protected BasicRabbitMqJmsImplementation.RMQDestinationBuilder builder()
- Overrides:
builder
in classBasicRabbitMqJmsImplementation
-
getConnectionFactoryProperties
@NonNull public @NonNull KeyValuePairSet getConnectionFactoryProperties()
Any additional properties that are required on theRMQConnectionFactory
.
-
setConnectionFactoryProperties
public void setConnectionFactoryProperties(@NonNull @NonNull KeyValuePairSet connectionFactoryProperties)
Any additional properties that are required on theRMQConnectionFactory
.
-
getExchangeName
public java.lang.String getExchangeName()
IfBasicRabbitMqJmsImplementation.setAmqpMode(Boolean)
is set to true, then additionally set the exchange name as well when creating theRMQDestination
.Note that no validation is done on this value, and it is passed as-is into the constructor for RMQDestination.
-
setExchangeName
public void setExchangeName(java.lang.String exchangeName)
IfBasicRabbitMqJmsImplementation.setAmqpMode(Boolean)
is set to true, then additionally set the exchange name as well when creating theRMQDestination
.Note that no validation is done on this value, and it is passed as-is into the constructor for RMQDestination.
-
getRoutingKey
public java.lang.String getRoutingKey()
IfBasicRabbitMqJmsImplementation.setAmqpMode(Boolean)
is set to true, then additionally set the exchange name as well when creating theRMQDestination
.Note that no validation is done on this value, and it is passed as-is into the constructor for RMQDestination.
-
setRoutingKey
public void setRoutingKey(java.lang.String routingKey)
IfBasicRabbitMqJmsImplementation.setAmqpMode(Boolean)
is set to true, then additionally set the exchange name as well when creating theRMQDestination
.Note that no validation is done on this value, and it is passed as-is into the constructor for RMQDestination.
-
-