Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-811

Enable the ability to configure maxFramePayloadSize for STOMP over WebSocket

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • None
    • AMQ 7.0.2.GA
    • stomp-protocol
    • None
    • Compatibility/Configuration, User Experience
    • size, which was the default limit. Using {BrokerVersion} version of {BrokerName}, you can limit the size of a message directly by adding the `maxWebSocketFrameSize` parameter to the connection string URI and providing the appropriate value in kilobytes.
    • Documented as Feature Request
    • AMQ Broker 7.1 Sprint 2

      Using the included stomp-websockets chat example, sending a message payload greater than 65k causes the broker to throw an exception.

      Steps to reproduce:
      1) Start Stomp WebSockets Example as per step-by-step procedure provided at https://access.redhat.com/documentation/en-us/red_hat_jboss_amq/7.0/html-single/using_amq_broker/#examples and readme file in the example directory. This example shows how to configure ActiveMQ Artemis to send and receive Stomp messages over websocket connection.
      2) To run the example, simply type mvn verify from ~/Downloads/amq-broker-7.0.2/examples/protocols/stomp/stomp-websockets directory.
      3) Launch ./chat/index.html page in browser.
      4) Click on Connect button.
      5) Type "Hello" in "message to send" text entry field.
      6) Message will be sent and received successfully.
      7) Type attached json in "message to send" text entry field.
      8) Connection to the broker will drop. Following error message will appear in the console.

      Exception thrown:

      io.netty.handler.codec.CorruptedFrameException: Max frame length of 65536 has been exceeded.
      	at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:412)
      	at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:277)
      	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)
      	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
      	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559)
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476)
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
      	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
      	at java.lang.Thread.run(Thread.java:745)
      

            rhn-support-jbertram Justin Bertram
            rhn-support-rkieley Roderick Kieley
            Martyn Taylor Martyn Taylor (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: