You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by "RatTac@web.de" <Ra...@web.de> on 2016/04/05 17:27:32 UTC

Max Frame Size for Java Broker

Is there any option to set the max frame size of the java broker?
Appearantly there was an option qpid.broker_frame_size (see
https://qpid.apache.org/releases/qpid-0.32/java-broker/book/Java-Broker-Appendix-System-Properties.html)
but it does not seem to be implemented (anymore?).

Background of my question is: Windows c++ clients via SSL currently only
support maximum frame sizes of 16K (see
https://issues.apache.org/jira/browse/QPID-2410 for more information).
However, the java broker seems to be configured to always send with a frame
size of 64K. I'd like to modify it to send 16K frames.

I already tried to modify the MAX_FRAME_SIZE value in
src/main/java/org/apache/qpid/transport/ServerDelegate.java but appearantly
this does not have any effect as indicated by this protocol trace of a
client:



So appearantly the client sends with max-frame-size=16384 (as expected) but
the broker still sends with max-frame-size=65535 (despite the changes in
ServerDelegate.java).

I would appreciate any feedback.



--
View this message in context: http://qpid.2158936.n2.nabble.com/Max-Frame-Size-for-Java-Broker-tp7641393.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: Max Frame Size for Java Broker

Posted by "RatTac@web.de" <Ra...@web.de>.
>From my point of view for a solution it should have been enough for the
clients to connect with max-frame-size accordingly set to 16K without
modifying the broker. However, this is not working (the client hangs if
sending messages larger than 16K).

Meanwhile I got it working:

Solution was:
1.) No need to modify the client c++ api
2.) Don't set max-frame-size in the client (i.e. in connection options)
3.) Modify the java broker to have a max-frame-size of 0x3FFF instead of
0XFFFF
in org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java

Strangely, if I set a max-frame-size:16384 in the connection parameters of
the client, it hangs if sending larger messages than this. If I remove
max-frame-size parameter from the connection option everything works fine.

However, it rather seems to be a problem of the c++ api from my point of
view.



--
View this message in context: http://qpid.2158936.n2.nabble.com/Max-Frame-Size-for-Java-Broker-tp7641393p7641504.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: Max Frame Size for Java Broker

Posted by Rob Godfrey <ro...@gmail.com>.
Alex's point is that the Java Broker change shouldn't really be necessary
as if the client wants 16K, the fact that the Broker offers up to 64K
shouldn't matter - the client should just use 16K, and the broker will use
16K... however maybe there is some issue in the client that makes this
necessary.

-- Rob

On 6 April 2016 at 11:03, RatTac@web.de <Ra...@web.de> wrote:

> Hi,
> thanks for your feedback. This already helps me a lot. Appearantly I was
> doing the changes at the wrong positions (ServerDelegate.java instead of
> ServerConnectionDelegate.java of the 0-10 protocol).
> I'll redo my experminents. If it's not working I'll generate the
> corresponding client / broker logs as suggested by you.
> Regards
> Tobias
>
>
>
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/Max-Frame-Size-for-Java-Broker-tp7641393p7641460.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Max Frame Size for Java Broker

Posted by "RatTac@web.de" <Ra...@web.de>.
Hi, 
thanks for your feedback. This already helps me a lot. Appearantly I was
doing the changes at the wrong positions (ServerDelegate.java instead of
ServerConnectionDelegate.java of the 0-10 protocol). 
I'll redo my experminents. If it's not working I'll generate the
corresponding client / broker logs as suggested by you.
Regards
Tobias



--
View this message in context: http://qpid.2158936.n2.nabble.com/Max-Frame-Size-for-Java-Broker-tp7641393p7641460.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: Max Frame Size for Java Broker

Posted by Oleksandr Rudyy <or...@gmail.com>.
Hi,

Could you please provide your client and corresponding broker logs
from your test where broker does not respect the frame size set in
client TuneOk?

Please, provide broker logs with debug log level. You can change
broker log level to debug by opening Web Management Console and
setting log level to DEBUG on 'logfile' logger rule for
"org.apache.qpid.*"

I just tested setting of frame size to 16k with TuneOk in java client
and that worked for me. Broker sent frames with max size of 16k on
both plain and ssl connections.
Could you please provide more details about your messaging use case
where the problem manifests?

Kind Regards,
Alex

On 5 April 2016 at 16:27, RatTac@web.de <Ra...@web.de> wrote:
> Is there any option to set the max frame size of the java broker?
> Appearantly there was an option qpid.broker_frame_size (see
> https://qpid.apache.org/releases/qpid-0.32/java-broker/book/Java-Broker-Appendix-System-Properties.html)
> but it does not seem to be implemented (anymore?).
>
> Background of my question is: Windows c++ clients via SSL currently only
> support maximum frame sizes of 16K (see
> https://issues.apache.org/jira/browse/QPID-2410 for more information).
> However, the java broker seems to be configured to always send with a frame
> size of 64K. I'd like to modify it to send 16K frames.
>
> I already tried to modify the MAX_FRAME_SIZE value in
> src/main/java/org/apache/qpid/transport/ServerDelegate.java but appearantly
> this does not have any effect as indicated by this protocol trace of a
> client:
>
>
>
> So appearantly the client sends with max-frame-size=16384 (as expected) but
> the broker still sends with max-frame-size=65535 (despite the changes in
> ServerDelegate.java).
>
> I would appreciate any feedback.
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Max-Frame-Size-for-Java-Broker-tp7641393.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

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


Re: Max Frame Size for Java Broker

Posted by Rob Godfrey <ro...@gmail.com>.
On 5 April 2016 at 16:27, RatTac@web.de <Ra...@web.de> wrote:

> Is there any option to set the max frame size of the java broker?
> Appearantly there was an option qpid.broker_frame_size (see
>
> https://qpid.apache.org/releases/qpid-0.32/java-broker/book/Java-Broker-Appendix-System-Properties.html
> )
> but it does not seem to be implemented (anymore?).
>
>
It is no longer implemented because frame size means different things (and
has different limits) across different AMQP versions, moreover in general
the Broker is advertising capabilities which aren't really sensible for a
user to tune.  Obviously in this case we have a bug in the Windows C++
client which means you want to artificially limit it.


> Background of my question is: Windows c++ clients via SSL currently only
> support maximum frame sizes of 16K (see
> https://issues.apache.org/jira/browse/QPID-2410 for more information).
> However, the java broker seems to be configured to always send with a frame
> size of 64K. I'd like to modify it to send 16K frames.
>
> I already tried to modify the MAX_FRAME_SIZE value in
> src/main/java/org/apache/qpid/transport/ServerDelegate.java but appearantly
> this does not have any effect as indicated by this protocol trace of a
> client:
>
>
>
> So appearantly the client sends with max-frame-size=16384 (as expected) but
> the broker still sends with max-frame-size=65535 (despite the changes in
> ServerDelegate.java).
>
> I would appreciate any feedback.
>
>

If you are modifying 6.0.x or trunk code then you will need to modify the
constructor for
org.apache.qpid.server.protocol.v0_10.ServerConnectionDelegate where you
will find the line

_maximumFrameSize = Math.min(0xffff, broker.getNetworkBufferSize());

if you change that 0xffff to 16384 then it should work for you.

-- Rob


> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/Max-Frame-Size-for-Java-Broker-tp7641393.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>