Class BasicRabbitMqJmsImplementation
- All Implemented Interfaces:
ComponentLifecycleExtension
,ConnectionComparator<VendorImplementationBase>
,VendorImplementation
,VendorImplementationBase
- Direct Known Subclasses:
AdvancedRabbitMqJmsImplementation
VendorImplementation
using RabbitMQ.
Everything required to configure the connection needs to be specified on the URL. If you configure a username and password on the
wrapping JmsConnection
in which case ConnectionFactory.createConnection(String, String)
is used when creating the
connection otherwise ConnectionFactory.createConnection()
will be used.
This was built against com.rabbitmq.jms:rabbitmq-jms:1.6.0
and com.rabbitmq:amqp-client:4.0.2
- Since:
- 3.6.0
In the adapter configuration file this class is aliased as rabbitmq-basic-jms-implementation which is the preferred alternative to the fully qualified classname when building your configuration.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
-
Field Summary
Fields inherited from class com.adaptris.core.jms.VendorImplementationImp
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
amqpMode()
builder()
boolean
connectionEquals
(VendorImplementationBase vendorImp) com.rabbitmq.jms.admin.RMQConnectionFactory
protected com.rabbitmq.jms.admin.RMQDestination
createDestination
(String name, JmsActorConfig c, boolean isQueue) javax.jms.Queue
createQueue
(String name, JmsActorConfig c) javax.jms.Topic
createTopic
(String name, JmsActorConfig c) Force the underlying JMS destination to be interopable with AMQP.void
setAmqpMode
(Boolean amqpMode) Force the underlying JMS destination to be interopable with AMQP.<T extends BasicRabbitMqJmsImplementation>
TMethods 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
-
Field Details
-
DEFAULT_OM_TIMEOUT
protected static final int DEFAULT_OM_TIMEOUT- See Also:
-
-
Constructor Details
-
BasicRabbitMqJmsImplementation
public BasicRabbitMqJmsImplementation()
-
-
Method Details
-
createConnectionFactory
public com.rabbitmq.jms.admin.RMQConnectionFactory createConnectionFactory() throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
connectionEquals
- Specified by:
connectionEquals
in interfaceConnectionComparator<VendorImplementationBase>
- Overrides:
connectionEquals
in classUrlVendorImplementation
-
createQueue
- Specified by:
createQueue
in interfaceVendorImplementationBase
- Overrides:
createQueue
in classVendorImplementationImp
- Throws:
javax.jms.JMSException
-
createTopic
- Specified by:
createTopic
in interfaceVendorImplementationBase
- Overrides:
createTopic
in classVendorImplementationImp
- Throws:
javax.jms.JMSException
-
withAmqpMode
-
amqpMode
public boolean amqpMode() -
createDestination
protected com.rabbitmq.jms.admin.RMQDestination createDestination(String name, JmsActorConfig c, boolean isQueue) throws javax.jms.JMSException - Throws:
javax.jms.JMSException
-
builder
-
setAmqpMode
Force the underlying JMS destination to be interopable with AMQP.Setting this to true changes queue and topic creation to use the
RMQDestination(String,String,String,String)
constructor. rather than delegating it to the underlying session. This allows interopability with AMQP senders such as bunny + JMS Producer/Consumers.Note the setting this to be true will still (under the covers) first use the JMS session to create a standard queue or topic (this has the effect of auto-declaring the required information within RabbitMQ first. After that it simply returns a
RMQDestination
with the specified name.The default is false if not specified.
-
getAmqpMode
Force the underlying JMS destination to be interopable with AMQP.Setting this to true changes queue and topic creation to use the
RMQDestination(String,String,String,String)
constructor. rather than delegating it to the underlying session. This allows interopability with AMQP senders such as bunny + JMS Producer/Consumers.Note the setting this to be true will still (under the covers) first use the JMS session to create a standard queue or topic (this has the effect of auto-declaring the required information within RabbitMQ first. After that it simply returns a
RMQDestination
with the specified name.The default is false if not specified.
-