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

Jiri Daněk commented on PROTON-1809:
------------------------------------

Another strange thing is that if I set max-frame-size to {{2**20}} for a sender 
and send message at or over 1024 kB in size, the message does get sent all 
right. If I set the same max-frame-size for a receiver and attempt to receive, 
I am able to receive message with 1023 kB of data, but not with 1024 kB data.

I would expect that setting max-frame-size to {{2*20}} limits my ability to 
both receive _and send_ messages of this size. What actually happens is that I 
seem to be able to send frames over that size.

In PN_TRACE_FRM=1 log, the transfer of the sent message (and also the received 
one, but then proton-ruby seems to ignore it...) is done in one frame (at least 
that is what it looks in the log).

{noformat}
[ruby, cli-proton-ruby-sender, --log-msgs, dict, --count, 1, --timeout, 5, 
--broker, amqp://127.0.0.1:5672/JAMQMessagefffTestsp1YEGfx, 
--msg-content-from-file, /tmp/11359847284256583852.tmp, --msg-property, 
key1=value1]
10139
[0x1c09c00]:  -> SASL
[0x1c09c00]:  <- SASL
[0x1c09c00]:0 <- @sasl-mechanisms(64) 
[sasl-server-mechanisms=@PN_SYMBOL[:PLAIN, :ANONYMOUS]]
[0x1c09c00]:0 -> @sasl-init(65) [mechanism=:ANONYMOUS, 
initial-response=b"anonymous@nixos"]
[0x1c09c00]:0 <- @sasl-outcome(68) [code=0]
[0x1c09c00]:  <- AMQP
[0x1c09c00]:  -> AMQP
[0x1c09c00]:0 -> @open(16) 
[container-id="ddfc4358-cbe3-4a2c-816e-d7634c749c91", max-frame-size=1048576, 
channel-max=32767]
[0x1c09c00]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=1, 
outgoing-window=2147483647]
[0x1c09c00]:0 -> @attach(18) [name="ddfc4358-cbe3-4a2c-816e-d7634c749c91/1", 
handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) 
[durable=0, timeout=0, dynamic=false], target=@target(41) 
[address="JAMQMessagefffTestsp1YEGfx", durable=0, timeout=0, dynamic=false], 
initial-delivery-count=0, max-message-size=0]
[0x1c09c00]:0 <- @open(16) [container-id="amq", max-frame-size=4294967295, 
channel-max=65535, idle-time-out=30000, 
offered-capabilities=@PN_SYMBOL[:"sole-connection-for-container", 
:"DELAYED_DELIVERY", :"SHARED-SUBS", :"ANONYMOUS-RELAY"], 
properties={:product="apache-activemq-artemis", 
:version="2.4.0.amq-710004-redhat-1"}]
[0x1c09c00]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1, 
incoming-window=2147483647, outgoing-window=2147483647, handle-max=65535]
[0x1c09c00]:0 <- @attach(18) [name="ddfc4358-cbe3-4a2c-816e-d7634c749c91/1", 
handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) 
[], target=@target(41) [address="JAMQMessagefffTestsp1YEGfx"]]
[0x1c09c00]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647, 
next-outgoing-id=1, outgoing-window=2147483647, handle=0, delivery-count=0, 
link-credit=1000]
[0x1c09c00]:0 -> @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"1", 
message-format=0] (4194346) 
"\x00SpE\x00SsE\x00St\xd1\x00\x00\x00\x12\x00\x00\x00\x02\xa3\x04key1\xa1\x06value1\x00Sw\xb1\x00@\x00\x00abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW"...
 (truncated)
[0x1c09c00]:0 <- @disposition(21) [role=true, first=0, last=0, settled=true, 
state=@accepted(36) []]
[0x1c09c00]:0 -> @detach(22) [handle=0, closed=true]
[0x1c09c00]:0 -> @close(24) []
[0x1c09c00]:  -> EOS
[0x1c09c00]:0 <- @detach(22) [handle=0, closed=true]
[0x1c09c00]:0 <- @close(24) []
[0x1c09c00]:  <- EOS
{'redelivered': False, 'reply_to': None, 'subject': None, 'content_type': None, 
'id': None, 'group_id': None, 'user_id': None, 'correlation_id': None, 
'priority': 4, 'durable': False, 'ttl': 0, 'properties': {'key1': 'value1'}, 
'content': 
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN
java.io.IOException: Stream closed
[ruby, cli-proton-ruby-receiver, --log-msgs, dict, --count, 1, --timeout, 5, 
--broker, amqp://127.0.0.1:5672/JAMQMessagefffTestsp1YEGfx]
10148
[0x26964e0]:  -> SASL
[0x26964e0]:  <- SASL
[0x26964e0]:0 <- @sasl-mechanisms(64) 
[sasl-server-mechanisms=@PN_SYMBOL[:PLAIN, :ANONYMOUS]]
[0x26964e0]:0 -> @sasl-init(65) [mechanism=:ANONYMOUS, 
initial-response=b"anonymous@nixos"]
[0x26964e0]:0 <- @sasl-outcome(68) [code=0]
[0x26964e0]:  <- AMQP
[0x26964e0]:  -> AMQP
[0x26964e0]:0 -> @open(16) 
[container-id="98b73194-8f5a-4484-a59f-c6d0c45b15a1", max-frame-size=1048576, 
channel-max=32767]
[0x26964e0]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=1, 
outgoing-window=2147483647]
[0x26964e0]:0 -> @attach(18) [name="98b73194-8f5a-4484-a59f-c6d0c45b15a1/1", 
handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) 
[address="JAMQMessagefffTestsp1YEGfx", durable=0, timeout=0, dynamic=false], 
target=@target(41) [durable=0, timeout=0, dynamic=false], 
initial-delivery-count=0, max-message-size=0]
[0x26964e0]:0 <- @open(16) [container-id="amq", max-frame-size=4294967295, 
channel-max=65535, idle-time-out=30000, 
offered-capabilities=@PN_SYMBOL[:"sole-connection-for-container", 
:"DELAYED_DELIVERY", :"SHARED-SUBS", :"ANONYMOUS-RELAY"], 
properties={:product="apache-activemq-artemis", 
:version="2.4.0.amq-710004-redhat-1"}]
[0x26964e0]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1, 
incoming-window=2147483647, outgoing-window=2147483647, handle-max=65535]
[0x26964e0]:0 <- @attach(18) [name="98b73194-8f5a-4484-a59f-c6d0c45b15a1/1", 
handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) 
[address="JAMQMessagefffTestsp1YEGfx"], target=@target(41) [], 
incomplete-unsettled=false, initial-delivery-count=0]
[0x26964e0]:0 -> @flow(19) [next-incoming-id=1, incoming-window=1, 
next-outgoing-id=0, outgoing-window=2147483647, handle=0, delivery-count=0, 
link-credit=10, drain=false]
[0x26964e0]:0 <- @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"\x00", 
message-format=0, more=true] (1048554) 
"\x00Sr\xc1)\x04\xa3\x0ex-opt-jms-destQ\x00\xa3\x12x-opt-jms-msg-typeQ\x05\x00Ss\xc0\x1f\x03@@\xa1\x1aJAMQMessagefffTestsp1YEGfx\x00St\xc1=\x06\xa1\x04key1\xa1\x06value1\xa1\x11JMSXDeliveryCount@\xa1\x0f_AMQ_LARGE_SIZE\x81\x00\x00\x00\x00\x00\x80\x00\x05\x00Sw\xb1\x00@\x00\x00abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ab"...
 (truncated)
[0x26964e0]:0 -> @flow(19) [next-incoming-id=2, incoming-window=0, 
next-outgoing-id=0, outgoing-window=2147483647, handle=0, delivery-count=1, 
link-credit=9, drain=false]
timeout expired
{noformat}

> [python, ruby] Unable to receive messages when max-frame-size is set to more 
> than 2^20
> --------------------------------------------------------------------------------------
>
>                 Key: PROTON-1809
>                 URL: https://issues.apache.org/jira/browse/PROTON-1809
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding, ruby-binding
>    Affects Versions: proton-c-0.22.0
>         Environment: RHEL 7 x86_64
>            Reporter: Radim Kubis
>            Assignee: Alan Conway
>            Priority: Major
>
> *Python:*
> {code:java}
>   def on_session_init(self, event):
>      event.transport._set_max_frame_size(VALUE)
> {code}
> I noticed that the receiver is not able to receive messages when the value 
> for max-frame-size is larger than 2^20 (1048576) bytes (remote_max_frame_size 
> is 4294967295). I'm not really sure if that is expected. This may be 
> reproduced when adding the code above ie.: to simple_recv.py.
> Note: This is not a good use case as setting the max-frame-size in 
> on_session_init is really too late. But given that it is too late to set the 
> max-frame-size, I would expect it won't have any effect on the client.
>  
> *Ruby:*
> From [https://github.com/rh-messaging/cli-proton-ruby] 
> [cli-proton-ruby|https://github.com/rh-messaging/cli-proton-ruby]
> {{cli-proton-ruby-receiver -b <broker> -c <msg_count> --log-msgs dict 
> --conn-max-frame-size 1048577}}
> Receiver is stuck.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to