Description of problem: An exception was thrown (ie. not-allowed: Exchange declared to be of type topic, requested fanout.. see additional info for more details) when trying to create broker object and the object is already existing but was declared as a different type. Starting from qpid-java-*-0.18-4 no Exception is thrown and messages are delivered to the existing object. Version-Release number of selected component (if applicable): qpid-java-*-0.18-4 and later How reproducible: 100% Steps to Reproduce: 1. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "ex;{create:sender, node: {type:topic,x-declare:{type:topic}}}" 2. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "ex;{create:sender, node: {type:topic,x-declare:{type:fanout}}}" 3. No exception 4. qpid-stat -e (both the messages were delivered to the topic exchange declared in step 1.) Actual results: no error message, message is delivered to the address even if the address properties differs Expected results: An error message is printed on creating already existing broker object and the existing object is declared as different type Additional info: # rpm -qa | grep qpid-java qpid-java-common-0.18-2.el5 qpid-java-example-0.18-2.el5 qpid-java-client-0.18-2.el5 # ./run_example.sh org.apache.qpid.example.Spout "ex726100;{ create:sender,assert:sender, node: { type:topic,x-declare:{type:topic} }, link: { } }" {} </snip> # ./run_example.sh org.apache.qpid.example.Spout "ex726100;{ create:sender, node: { type:topic,x-declare:{type:fanout} }, link: { } }" {} IoReceiver - localhost/127.0.0.1:5672 2012-11-13 11:17:34,959 ERROR [apache.qpid.client.AMQConnection] Throwable Received but no listener set: org.apache.qpid.AMQException: ch=0 id=1 ExecutionException(errorCode=NOT_ALLOWED, commandId=1, classCode=7, commandCode=1, fieldIndex=0, description=not-allowed: Exchange declared to be of type topic, requested fanout (qpid/broker/SessionAdapter.cpp:125), errorInfo={}) [error code 530: not allowed] main 2012-11-13 11:17:34,976 ERROR [apache.qpid.client.AMQConnection] Throwable Received but no listener set: org.apache.qpid.AMQException: ch=0 id=1 ExecutionException(errorCode=NOT_ALLOWED, commandId=1, classCode=7, commandCode=1, fieldIndex=0, description=not-allowed: Exchange declared to be of type topic, requested fanout (qpid/broker/SessionAdapter.cpp:125), errorInfo={}) [error code 530: not allowed] Exception in thread "main" javax.jms.JMSException: Error creating producer at org.apache.qpid.client.AMQSession_0_10.createMessageProducer(AMQSession_0_10.java:660) at org.apache.qpid.client.AMQSession_0_10.createMessageProducer(AMQSession_0_10.java:67) at org.apache.qpid.client.AMQSession$7.execute(AMQSession.java:2633) at org.apache.qpid.client.AMQSession$7.execute(AMQSession.java:2624) at org.apache.qpid.client.AMQConnectionDelegate_0_10.executeRetrySupport(AMQConnectionDelegate_0_10.java:369) at org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:593) at org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102) at org.apache.qpid.client.AMQSession.createProducerImpl(AMQSession.java:2622) at org.apache.qpid.client.AMQSession.createProducer(AMQSession.java:1201) at org.apache.qpid.client.AMQSession.createProducer(AMQSession.java:102) at org.apache.qpid.example.Spout.<init>(Spout.java:91) at org.apache.qpid.example.Spout.main(Spout.java:146) Caused by: org.apache.qpid.AMQException: Exception occured while verifying destination at org.apache.qpid.client.BasicMessageProducer_0_10.declareDestination(BasicMessageProducer_0_10.java:93) at org.apache.qpid.client.BasicMessageProducer.<init>(BasicMessageProducer.java:151) at org.apache.qpid.client.BasicMessageProducer_0_10.<init>(BasicMessageProducer_0_10.java:66) at org.apache.qpid.client.AMQSession_0_10.createMessageProducer(AMQSession_0_10.java:655) ... 11 more Caused by: org.apache.qpid.AMQException: ch=0 id=1 ExecutionException(errorCode=NOT_ALLOWED, commandId=1, classCode=7, commandCode=1, fieldIndex=0, description=not-allowed: Exchange declared to be of type topic, requested fanout (qpid/broker/SessionAdapter.cpp:125), errorInfo={}) [error code 530: not allowed] at org.apache.qpid.client.AMQSession_0_10.setCurrentException(AMQSession_0_10.java:1051) at org.apache.qpid.client.AMQSession_0_10.sync(AMQSession_0_10.java:1031) at org.apache.qpid.client.AMQSession_0_10.sendExchangeDeclare(AMQSession_0_10.java:699) at org.apache.qpid.client.AMQSession_0_10.handleAddressBasedDestination(AMQSession_0_10.java:1243) at org.apache.qpid.client.BasicMessageProducer_0_10.declareDestination(BasicMessageProducer_0_10.java:89) ... 14 more
This issue is tracked upstream via QPID-4497 A fix is committed upstream at http://svn.apache.org/viewvc?rev=1418539&view=rev
I have made a mistake in the above comment. The correct JIRA is QPID-4496 It's best to port http://svn.apache.org/viewvc?rev=1419708&view=rev as it fixes a typo in the error message. Alternatively you could manually fix the typo when porting the commit mentioned in the previous comment. Rajith
This issue has been fixed. Verified on rhel5.9 and rhel6.3 (x86_64, i386) packages used for testing: qpid-java-*-0.18-6 -> VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0561.html