Keith Wall created QPID-5906:
--------------------------------

             Summary: Creating consumer with Rabbit fails unless 
IMMEDIATE_PREFETCH is set
                 Key: QPID-5906
                 URL: https://issues.apache.org/jira/browse/QPID-5906
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
         Environment: Rabbit 3.3.4
Qpid Client 0.29
            Reporter: Keith Wall


I've noticed that if I try to use the Qpid Client (testing with 0.29) to create 
a Consumer with Rabbit, creating the consumer fails unless I set the 
IMMEDIATE_PREFETCH system property.   Specifically, the Rabbit server is 
returning a NOT_IMPLEMENTED - active=false [error code 540: not implemented] in 
response to the channel.flow active=false.

{noformat}
com.intellij.rt.execution.application.AppMain org.apache.qpid.example.Hello
2014-07-19 14:32:34,203 ERROR [IoReceiver - /10.211.55.13:5672] [AMQConnection] 
Throwable Received but no listener set: 
org.apache.qpid.AMQConnectionClosedException: Error: NOT_IMPLEMENTED - 
active=false [error code 540: not implemented]
javax.jms.JMSException: Error registering consumer: 
org.apache.qpid.AMQConnectionClosedException: Error: NOT_IMPLEMENTED - 
active=false [error code 540: not implemented]
        at 
org.apache.qpid.client.AMQSession.toJMSException(AMQSession.java:3504)
        at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2043)
        at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:1995)
        at 
org.apache.qpid.client.AMQConnectionDelegate_8_0.executeRetrySupport(AMQConnectionDelegate_8_0.java:333)
        at 
org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:625)
        at 
org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
        at 
org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:1993)
        at org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:942)
        at org.apache.qpid.example.Hello.runTest(Hello.java:58)
        at org.apache.qpid.example.Hello.main(Hello.java:40)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.apache.qpid.AMQConnectionClosedException: Error: NOT_IMPLEMENTED 
- active=false [error code 540: not implemented]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at 
org.apache.qpid.AMQException.cloneForCurrentThread(AMQException.java:134)
        at 
org.apache.qpid.client.protocol.AMQProtocolHandler.writeCommandFrameAndWaitForReply(AMQProtocolHandler.java:682)
        at 
org.apache.qpid.client.protocol.AMQProtocolHandler.syncWrite(AMQProtocolHandler.java:719)
        at 
org.apache.qpid.client.protocol.AMQProtocolHandler.syncWrite(AMQProtocolHandler.java:713)
        at 
org.apache.qpid.client.AMQSession_0_8.sendConsume(AMQSession_0_8.java:465)
        at 
org.apache.qpid.client.AMQSession_0_8.sendConsume(AMQSession_0_8.java:62)
        at 
org.apache.qpid.client.AMQSession.consumeFromQueue(AMQSession.java:2589)
        at 
org.apache.qpid.client.AMQSession.registerConsumer(AMQSession.java:2924)
        at org.apache.qpid.client.AMQSession.access$400(AMQSession.java:98)
        at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2020)
        ... 13 more
{noformat}

On the Rabbit side I see:

{noformat}
=ERROR REPORT==== 19-Jul-2014::14:32:33 ===
AMQP connection <0.884.0> (running), channel 1 - error:
{amqp_error,not_implemented,"active=false",'channel.flow'}

=INFO REPORT==== 19-Jul-2014::14:32:33 ===
closing AMQP connection <0.884.0> (10.211.55.2:61875 -> 10.211.55.13:5672)
{noformat}

Setting IMMEDIATE_PREFETCH prevents the client from producing the channel.flow 
and this allows the consumer to be created properly and messages to flow.




--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to