code: @Override
      protected void onChunkSize(RTMPConnection conn, Channel channel, Header source, ChunkSize chunkSize) {
          int requestedChunkSize = chunkSize.getSize();
          log.debug("Chunk size: {}", requestedChunkSize);
          // set chunk size on the connection
          RTMP state = conn.getState();
          // set only the read chunk size since it came from the client
          state.setReadChunkSize(requestedChunkSize);
          //state.setWriteChunkSize(requestedChunkSize);
          // set on each of the streams
          for (IClientStream stream : conn.getStreams()) {
              if (stream instanceof IClientBroadcastStream) {
                  IClientBroadcastStream bs = (IClientBroadcastStream) stream;
                  IBroadcastScope scope = bs.getScope().getBroadcastScope(bs.getPublishedName());
                  if (scope == null) {
                      continue;
                  }
                  OOBControlMessage setChunkSize = new OOBControlMessage();
                  setChunkSize.setTarget("ClientBroadcastStream");
                  setChunkSize.setServiceName("chunkSize");
                  if (setChunkSize.getServiceParamMap() == null) {
                      setChunkSize.setServiceParamMap(new HashMap<String, Object>());
                  }
                  setChunkSize.getServiceParamMap().put("chunkSize", requestedChunkSize);
                  scope.sendOOBControlMessage((IConsumer) null, setChunkSize);
                  log.debug("Sending chunksize {} to {}", chunkSize, bs.getProvider());
              }
          }
      }
docs: {@inheritDoc}