You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by areddy <ar...@better.com> on 2018/08/24 19:20:19 UTC

qpid proton not sending EMPTY FRAME

I modified simple_recv.py and set auto_accept=False and then added a sleep in
the on_message method. 
Here is the  gist
<https://gist.github.com/archerabi/c64cef4168a124e1d61418e00d57de9a>  

Here is the log output


[0x7fe0a4d806e0]:  -> SASL
[0x7fe0a4d806e0]:  <- SASL
[0x7fe0a4d806e0]:0 <- @sasl-mechanisms(64)
[sasl-server-mechanisms=@PN_SYMBOL[:PLAIN, :ANONYMOUS]]
[0x7fe0a4d806e0]:0 -> @sasl-init(65) [mechanism=:ANONYMOUS,
initial-response=b"anonymous@BNY179.local"]
[0x7fe0a4d806e0]:0 <- @sasl-outcome(68) [code=0]
[0x7fe0a4d806e0]:  <- AMQP
[0x7fe0a4d806e0]:  -> AMQP
[0x7fe0a4d806e0]:0 -> @open(16)
[container-id="7227b2b0-c086-427a-afe7-4ccd2f13f5a9", hostname="localhost",
channel-max=32767]
[0x7fe0a4d806e0]:0 -> @begin(17) [next-outgoing-id=0,
incoming-window=2147483647, outgoing-window=2147483647]
[0x7fe0a4d806e0]:0 -> @attach(18)
[name="7227b2b0-c086-427a-afe7-4ccd2f13f5a9-examples", handle=0, role=true,
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="examples", durable=0, timeout=0, dynamic=false],
target=@target(41) [durable=0, timeout=0, dynamic=false],
initial-delivery-count=0, max-message-size=0]
[0x7fe0a4d806e0]:0 -> @flow(19) [incoming-window=2147483647,
next-outgoing-id=0, outgoing-window=2147483647, handle=0, delivery-count=0,
link-credit=2, drain=false]
[0x7fe0a4d806e0]:0 <- @open(16) [container-id="localhost",
max-frame-size=131072, channel-max=32767, idle-time-out=15000,
offered-capabilities=@PN_SYMBOL[:"ANONYMOUS-RELAY", :"DELAYED_DELIVERY"],
properties={:product="ActiveMQ", :"topic-prefix"="topic://",
:"queue-prefix"="queue://", :version="5.15.5", :platform="Java/1.8.0_162"}]
[0x7fe0a4d806e0]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1,
incoming-window=16383, outgoing-window=2147483647, handle-max=65535]
[0x7fe0a4d806e0]:0 <- @attach(18)
[name="7227b2b0-c086-427a-afe7-4ccd2f13f5a9-examples", handle=0, role=false,
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="examples"], target=@target(41) [], incomplete-unsettled=false,
initial-delivery-count=0]
[0x7fe0a4d806e0]:0 <- @transfer(20) [handle=0, delivery-id=0,
delivery-tag=b"\x00", message-format=0] (44)
"\x00Sp�\x07\x05@@@@R\x02\x00Ss�\x00\x00\x00\x06\x00\x00\x00\x01S\x03\x00Sw�\x0d\x02�\x08sequenceU\x03"
[0x7fe0a4d806e0]:0 <- @transfer(20) [handle=0, delivery-id=1,
delivery-tag=b"\x01", message-format=0] (44)
"\x00Sp�\x07\x05@@@@R\x02\x00Ss�\x00\x00\x00\x06\x00\x00\x00\x01S\x04\x00Sw�\x0d\x02�\x08sequenceU\x04"
{'sequence': 3}
{'sequence': 4}
[0x7fe0a4d806e0]:0 -> @flow(19) [next-incoming-id=3,
incoming-window=2147483647, next-outgoing-id=0, outgoing-window=2147483647,
handle=0, delivery-count=2, link-credit=1, drain=false]
[0x7fe0a4d806e0]:0 -> @disposition(21) [role=true, first=0, last=1,
settled=true, state=@accepted(36) []]
[0x7fe0a4d806e0]:0 <- @close(24) [error=@error(29)
[condition=:"amqp:resource-limit-exceeded", description="local-idle-timeout
expired"]]
[0x7fe0a4d806e0]:  <- EOS
[0x7fe0a4d806e0]:0 -> (EMPTY FRAME)
[0x7fe0a4d806e0]:  <- EOS

As you can see qpid proton client doesn't send EMPTY FRAMES to keep the
connection alive. As a result activemq closes the connection with the error
'local-idle-timeout expired'

Is this a bug or am i doing something wrong ?



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid proton not sending EMPTY FRAME

Posted by areddy <ar...@better.com>.
Thats perfect, thank you very much Gordon Sim.



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid proton not sending EMPTY FRAME

Posted by Gordon Sim <gs...@redhat.com>.
On 24/08/18 20:59, areddy wrote:
> Thank you. that helps. I tried processing messages in another thread so the
> the event thread can continue sending heartbeats, and qpid does in fact send
> them out now.
> 
> But now the link credit is replenished immediately after on_message, which
> causes the client to continuously fetch messages off the broker, even though
> i've not dispositioned the previous messages. Is there a way to control the
> flow ?


Yes, you can set the prefetch parameter to the MessagingHandler 
superclass to 0 and then use the flow method on a receiver to grant more 
credit when you are ready.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid proton not sending EMPTY FRAME

Posted by areddy <ar...@better.com>.
Thank you. that helps. I tried processing messages in another thread so the
the event thread can continue sending heartbeats, and qpid does in fact send
them out now. 

But now the link credit is replenished immediately after on_message, which
causes the client to continuously fetch messages off the broker, even though
i've not dispositioned the previous messages. Is there a way to control the
flow ?



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: qpid proton not sending EMPTY FRAME

Posted by Gordon Sim <gs...@redhat.com>.
On 24/08/18 20:20, areddy wrote:
> I modified simple_recv.py and set auto_accept=False and then added a sleep in
> the on_message method.

It is single threaded. If you sleep on the event thread it cannot do 
anything including sending heartbeats.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org