我正在尝试使用Qpid-6.1.7资源适配器连接到RabbitMQ。 将建立连接,但我收到java.lang.UnsupportedOperationException:0_8版本不提供XA支持
Stacktrace:
15:36:14,830 ERROR [org.apache.qpid.ra.inflow.QpidExceptionHandler] (Thread-66)[,] Unable to reconnect org.apache.qpid.ra.inflow.QpidActivationSpec(ra=org.apache.qpid.ra.QpidResourceAdapter@15fef9c0 destination=jboss/exported/queue/mail destinationType=javax.jms.Queue
ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15 connectionPerHandler=false): java.lang.UnsupportedOperationException: 0_8 version does not provide XA support
at org.apache.qpid.client.AMQConnectionDelegate_8_0.createXASession(AMQConnectionDelegate_8_0.java:243)
at org.apache.qpid.client.AMQConnectionDelegate_8_0.createXASession(AMQConnectionDelegate_8_0.java:326)
at org.apache.qpid.client.XAConnectionImpl.createXASession(XAConnectionImpl.java:56)
at org.apache.qpid.ra.QpidResourceAdapter.createXASession(QpidResourceAdapter.java:573)
at org.apache.qpid.ra.inflow.QpidMessageHandler.setup(QpidMessageHandler.java:101)
at org.apache.qpid.ra.inflow.QpidMessageHandler.start(QpidMessageHandler.java:273)
at org.apache.qpid.ra.inflow.QpidActivation.setup(QpidActivation.java:122)
at org.apache.qpid.ra.inflow.QpidExceptionHandler.handleFailure(QpidExceptionHandler.java:168)
at org.apache.qpid.ra.inflow.QpidActivation$SetupActivation.run(QpidActivation.java:207)
at java.lang.Thread.run(Thread.java:748)
我已将Qpid-Ra属性设置为使用LocalTransaction,但服务器仍会引发此错误。
standalone.xml:
<resource-adapters>
<resource-adapter id="qpid">
<archive>qpid-ra-6.1.7.rar</archive>
<transaction-support>LocalTransaction</transaction-support>
<config-property name="TransactionManagerLocatorClass">org.apache.qpid.ra.tm.JBoss7TransactionManagerLocator</config-property>
<config-property name="TransactionManagerLocatorMethod">getTm</config-property>
<config-property name="UseLocalTx">true</config-property>
<config-property name="ConnectionURL">amqp://guest:guest@clientid/?brokerlist='tcp://localhost:5672?sasl_mechs='PLAIN''</config-property>
<connection-definitions>
<connection-definition class-name="org.apache.qpid.ra.QpidRAManagedConnectionFactory" jndi-name="qpid-ra" pool-name="qpid-ra">
<config-property name="SessionDefaultType">javax.jms.Queue</config-property>
</connection-definition>
</connection-definitions>
<admin-objects>
<admin-object class-name="org.apache.qpid.ra.admin.QpidQueueImpl" jndi-name="java:jboss/exported/queue/mail" use-java-context="true" pool-name="mail">
<config-property name="DestinationAddress">queue/mail</config-property>
</admin-object>
</admin-objects>
</resource-adapter>
</resource-adapters>
到目前为止,我很困惑为什么LocalTX属性在这种情况下无济于事。