Hi Charith/Shammi,
I have debug related to the issue https://wso2.org/jira/browse/CARBON-12839
This is what I have found. This is related to publishing messages to Andes
queues and receiving them back.
- The subscriber must have
*System.setProperty(ClientProperties.AMQP_VERSION,
"0-91") *to be able to subscribe to andes. Otherwise it is not
subscribed.
- The message sender
- When *System.setProperty(ClientProperties.AMQP_VERSION, "0-91")
not set *it runs
with queueSession.createQueue("testQueue;{create:always, node:{durable:
true}}"); but no messages comes to AMQP channel.
- When *System.setProperty(ClientProperties.AMQP_VERSION, "0-91") is
set *it runs
with queueSession.createQueue("testQueue;{create:always, node:{durable:
true}}") but following exception occurs.
org.apache.qpid.client.JMSAMQException: Queue bound query failed: Attempt
to redeclare exchange: null of type direct to null.
at
org.apache.qpid.client.AMQSession_0_8.isQueueBound(AMQSession_0_8.java:301)
at
org.apache.qpid.client.BasicMessageProducer.isBound(BasicMessageProducer.java:599)
at
org.apache.qpid.client.QueueSenderAdapter.checkQueuePreConditions(QueueSenderAdapter.java:210)
at
org.apache.qpid.client.QueueSenderAdapter.send(QueueSenderAdapter.java:53)
at SendClient.sendMessage(SendClient.java:60)
at SendClient.main(SendClient.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.apache.qpid.client.AMQAuthenticationException: Attempt to
redeclare exchange: null of type direct to null. [error code 530: not
allowed]
at
org.apache.qpid.client.handler.ConnectionCloseMethodHandler.methodReceived(ConnectionCloseMethodHandler.java:80)
at
org.apache.qpid.client.handler.ClientMethodDispatcherImpl.dispatchConnectionClose(ClientMethodDispatcherImpl.java:192)
at
org.apache.qpid.framing.amqp_0_91.ConnectionCloseBodyImpl.execute(ConnectionCloseBodyImpl.java:140)
at
org.apache.qpid.client.state.AMQStateManager.methodReceived(AMQStateManager.java:112)
at
org.apache.qpid.client.protocol.AMQProtocolHandler.methodBodyReceived(AMQProtocolHandler.java:536)
at
org.apache.qpid.client.protocol.AMQProtocolSession.methodFrameReceived(AMQProtocolSession.java:458)
at
org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:93)
at
org.apache.qpid.client.protocol.AMQProtocolHandler$2.run(AMQProtocolHandler.java:487)
at org.apache.qpid.pool.Job.processAll(Job.java:110)
at org.apache.qpid.pool.Job.run(Job.java:149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
When this exception occurs no Andes methods related to message creation,
message routing are called. Thus this is purely client related issue or
session related issue.
Googling I have found that this is related to sessions. (Class
AMQSession_0_8).
Please refer class at
http://people.apache.org/~grkvlt/qpid-site/qpid-java/qpid-client/xref/org/apache/qpid/client/AMQSession_0_8.html
(Line
num:276)
Above exception is thrown by that method.
The relevant library file for this is qpid-client-0.11.wso2v1.jar. How do
we generate it? Cannot there be the issue with this?
*
*
*The other possibility is: *
Above mentioned isQueueBound method fails because "*Attempt to redeclare
exchange: null of type direct to null*". According to the thread
http://qpid.2158936.n2.nabble.com/can-t-config-a-fanout-exchange-td3739045.html
the issue has a connection with defining the exchanges in virtualhosts.xml
file. Did we change anything w:r:t old version here? Can it be causing the
problem?
Other thing to note is that without
*System.setProperty(ClientProperties.AMQP_VERSION,
"0-91") *subscribers are not subscribed and messages sent by senders does
not appear at AMQP Channel. Happy path is running consumer first and then
running sender with initialContextProperties.put("queue.testQueue102",
"<queueName>");
Thanks.
--
*Hasitha Abeykoon*
Software Engineer; WSO2, Inc.; http://wso2.com
*cell:* *+94 719363063*
*blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>* *
*
*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev