Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client must honor the max-frame-size it sent in Open #218

Closed
ChugR opened this issue Jul 20, 2017 · 1 comment
Closed

Client must honor the max-frame-size it sent in Open #218

ChugR opened this issue Jul 20, 2017 · 1 comment
Labels

Comments

@ChugR
Copy link
Contributor

ChugR commented Jul 20, 2017

A Lite client opens a receiving link to a peer advertising a max frame size of 262,144. The peer responds with a max frame size of 16,384. The Lite client must accept frames with sizes up to the limit it told the peer (262,144) and the client must not send frames larger than what the peer negotiated (16,384).

The issue here is if the peer sends a frame larger than 16K but less than 256K then the Lite client throws.

To my reading the spec isn't clear about how max frame size is negotiated. My friends at Apache Qpid insist that two max frame sizes should be in effect on every link and that a sender's duty is to limit frames to what the peer requested.

◊  ◊◊ 6.611899  Frame 25  127.0.0.1:46798  -> 127.0.0.1:5672  ->   open [0]
   ◊  open [0]
        Length: 71
        Doff: 2
        Type: AMQP (0)
        Channel: 0
        Performative: open (16)
        Arguments
             Container-Id: f0cb7a9b-bbe6-43c9-a611-f7bef4b00247
             Hostname: 127.0.0.1
             Max-Frame-Size: 262144
             Channel-Max: 256
◊  ◊◊ 6.612002  Frame 26  127.0.0.1:46798 <-  127.0.0.1:5672 <-    open [0]
   ◊  open [0]
        Length: 47
        Doff: 2
        Type: AMQP (0)
        Channel: 0
        Performative: open (16)
        Arguments
             Container-Id: ./streamer
             Max-Frame-Size: 16384
             Channel-Max: 256

$ Interop.Drain.exe --broker amqp://127.0.0.1:5672 --timeout 120 --count 1 --initial-credit 250 --reset-credit 50 --address example --quiet
Exception Amqp.AmqpException: Invalid frame size:32732, maximum frame size:16384.
  at Amqp.ReceiverLink.ReceiveInternal (Amqp.MessageCallback callback, Int32 timeout) <0x413a9c30 + 0x00393> in <filename unknown>:0 
  at Amqp.ReceiverLink.Receive (TimeSpan timeout) <0x413a9a40 + 0x0002b> in <filename unknown>:0 
  at Examples.Interop.Drain.Main (System.String[] args) <0x41308020 + 0x0039f> in <filename unknown>:0 .
2
@ChugR
Copy link
Contributor Author

ChugR commented Jul 27, 2017

Retested this and it works great. Thanks @xinchen10

@ChugR ChugR closed this as completed Jul 27, 2017
nextra-Team pushed a commit to nextra-solutions/amqpnetlite that referenced this issue Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants