[ 
https://issues.apache.org/jira/browse/QPID-3707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13175088#comment-13175088
 ] 

Keith Wall edited comment on QPID-3707 at 12/22/11 9:52 PM:
------------------------------------------------------------

Hello Frank,

Yes, I agree, this is a defect in the QueueUnbindHandler.  It needs to check 
the protocol version and cast to the appropriate MethodRegistry: 
MethodRegistry_0_9 or MethodRegistry_0_91 as QueueUnbind exists only in the 0-9 
and 0-9-1 protocol versions.   The code fix is straightforward and I plan to 
commit a change.  Automated testing from Java will require more changes as 
currently QueueUnbind is not exposed through the Java Qpid client API.

Just out of interest, which Qpid client do you use?  As a workaround in the 
meanwhile, you could consider using the JMX ManagedExchange.removeBinding 
operation.

Hope this helps, Keith.

 
                
      was (Author: k-wall):
    Hello Frank,

Yes, I agree, this is a defect in the QueueUnbindHandler.  It needs to check 
the protocol version and cast to the appropriate MethodRegistry: 
MethodRegistry_0_9 or MethodRegistry_0_91 as QueueUnbind exists only in the 0-9 
and 0-9-1 protocol versions.   The code fix is straightforward and I plan to 
commit a change.  Testing from Java will require more changes as current 
QueueUnbind is not exposed through the Java Qpid client API.



 

 
                  
> Unbind queue causes connection failure when using AMQP 0-9-1
> ------------------------------------------------------------
>
>                 Key: QPID-3707
>                 URL: https://issues.apache.org/jira/browse/QPID-3707
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.12, 0.15
>            Reporter: Frank Salim
>
> The broker sends a FIN after receiving an unbind queue command. The stack 
> trace (below) shows a ClassCastException caused by attempting to cast a 
> MethodRegistry_0_91 to a MethodRegistry_0_9. The offending line of code 
> appears to be line 117 in the QueueUnbindHandler (trunk):
> MethodRegistry_0_9 methodRegistry = (MethodRegistry_0_9) 
> session.getMethodRegistry();
> Compare to line 153 in QueueBindHandler (trunk) which reads:
> MethodRegistry methodRegistry = protocolConnection.getMethodRegistry();
> Note: reproduced against version 0.12 and trunk r1221838.
> 2011-12-20 15:23:53,157 INFO [pool-3-thread-19] logging.Log4jMessageLogger 
> (Log4jMessageLogger.java:72) - [con:0(guest@/127.0.0.1:51326/test)/ch:2] 
> [vh(/test)/ex(fanout/demo_exchange)/qu(client259647)/rk(broadcastkey)] 
> BND-1002 : Deleted
> 2011-12-20 15:23:53,158 ERROR [pool-3-thread-19] protocol.AMQProtocolEngine 
> (AMQProtocolEngine.java:456) - Unexpected exception while processing frame. 
> Closing connection.
> java.lang.ClassCastException: 
> org.apache.qpid.framing.amqp_0_91.MethodRegistry_0_91 cannot be cast to 
> org.apache.qpid.framing.amqp_0_9.MethodRegistry_0_9
> at 
> org.apache.qpid.server.handler.QueueUnbindHandler.methodReceived(QueueUnbindHandler.java:117)
> at 
> org.apache.qpid.server.handler.ServerMethodDispatcherImpl_0_91.dispatchQueueUnbind(ServerMethodDispatcherImpl_0_91.java:165)
> at 
> org.apache.qpid.framing.amqp_0_91.QueueUnbindBodyImpl.execute(QueueUnbindBodyImpl.java:152)
> at 
> org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:205)
> at 
> org.apache.qpid.server.protocol.AMQProtocolEngine.methodFrameReceived(AMQProtocolEngine.java:390)
> at org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:93)
> at 
> org.apache.qpid.server.protocol.AMQProtocolEngine.frameReceived(AMQProtocolEngine.java:334)
> at 
> org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:283)
> at 
> org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to