Class AdvancedQpidImplementation
- java.lang.Object
-
- com.adaptris.core.jms.VendorImplementationImp
-
- com.adaptris.core.jms.UrlVendorImplementation
-
- com.adaptris.core.amqp.qpid.BasicQpidImplementation
-
- com.adaptris.core.amqp.qpid.AdvancedQpidImplementation
-
- All Implemented Interfaces:
ComponentLifecycleExtension
,ConnectionComparator<VendorImplementationBase>
,VendorImplementation
,VendorImplementationBase
public class AdvancedQpidImplementation extends BasicQpidImplementation
AMQP 1.0 implementation ofVendorImplementation
using Apache Qpid.This vendor implementation class directly exposes almost all the setters that are available in the ConnectionFactory for maximum flexibility in configuration. The main difference between this and
BasicQpidImplementation
is that you do not have to configure all the properties as part of the URL, which is simply a bonus for readability. The Keystore and Truststore passwords may also be encoded usingPassword.encode(String, String)
rather than plain text.The key from the
connection-factory-properties
element should match the name of the underlying Qpid ConnectionFactory property.<connection-factory-properties> <key-value-pair> <key>QueuePrefix</key> <value>abc</value> </key-value-pair> </connection-factory-properties>
will invokeConnectionFactoryImpl.setQueuePrefix(String)
, setting the QueuePrefix property to "abc". Only explicitly configured properties will invoke the associated setter method; unmatched properties are ignored and property keys are not case sensitiveThis vendor implementation is suitable for use with Azure AMQP. If you are using a topic consumer then it must be a durable subscriber where the subscriptionID is the same as the subscription created in the Azure portal; the topic name should be
[topic-name]/subscriptions/[subscriptionID]
. Your mileage may vary but during testing this was the the only destination configuration that seemed to work; the documentation suggests that this might actually pretending to be aqueue
.This was built against
org.apache.qpid:qpid-amqp-1-0-client-jms:0.32
.In the adapter configuration file this class is aliased as qpid-advanced-amqp-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 static class
AdvancedQpidImplementation.ConnectionFactoryProperty
Properties matched against various ConnectionFactoryImpl methods.
-
Field Summary
-
Fields inherited from class com.adaptris.core.jms.VendorImplementationImp
log
-
-
Constructor Summary
Constructors Constructor Description AdvancedQpidImplementation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyValuePairSet
getConnectionFactoryProperties()
void
setConnectionFactoryProperties(KeyValuePairSet kvps)
Set any additional ConnectionFactory properties that are required.-
Methods inherited from class com.adaptris.core.amqp.qpid.BasicQpidImplementation
connectionEquals, createConnectionFactory
-
Methods inherited from class com.adaptris.core.jms.UrlVendorImplementation
getBrokerUrl, retrieveBrokerDetailsForLogging, setBrokerUrl
-
Methods inherited from class com.adaptris.core.jms.VendorImplementationImp
applyVendorSessionProperties, createConsumer, createDestination, createQueue, createQueueReceiver, createSession, createTopic, 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
-
getConnectionFactoryProperties
public KeyValuePairSet getConnectionFactoryProperties()
- Returns:
- The additional connection factory properties.
-
setConnectionFactoryProperties
public void setConnectionFactoryProperties(KeyValuePairSet kvps)
Set any additional ConnectionFactory properties that are required.The key from the
connection-factory-properties
element should match the name of the underlying Qpid ConnectionFactory property.<connection-factory-properties> <key-value-pair> <key>QueuePrefix</key> <value>abc</value> </key-value-pair> </connection-factory-properties>
ConnectionFactoryImpl.setQueuePrefix(String)
, setting the QueuePrefix property to "abc". Only explicitly configured properties will invoke the associated setter method.- Parameters:
kvps
- the additional connectionFactoryProperties to set
-
-