Announcement Announcement Module
No announcement yet.
Message size Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Message size

    I'm using tcp-inbound-channel-adapter to deliver me xml messages. It appears there's a defualt maxium size for the message. Larger messages couldn't go through. Below is the configuration. Is there a way to fix it.
    Last edited by yingmeix; May 18th, 2012, 03:42 PM.

  • #2
    Please use [ code ] ... [ /code ] tags around code and config when posting - it makes it easier to read.

    Yes, this is documented in the reference manual...

    To avoid memory exhaustion due to a badly behaved client (one that does not adhere to the protocol of the configured serializer), these serializers impose a maximum message size. If the size is exceeded by an incoming message, an exception will be thrown. The default maximum message size is 2048 bytes, and can be increased by setting the maxMessageSize property. If you are using the default (de)serializer and wish to increase the maximum message size, you must declare it as an explicit bean with the property set and configure the connection factory to use that bean.
    Here's how to increase the max size to 4096...

    <bean id="MSAC_LOTSerializer"
    	<property name="maxMessageSize" value="4096" />        


    • #3
      FYI, you don't need two beans; you can inject the same bean instance into both the serializer and deserializer attributes. The max message size has no bearing on outbound (serializer).

      I also notice that the bean you gave an id of ...deserializer you injected as the serializer (and vice versa). This won't make any difference, but it looks odd - like I said just use one bean anyhow.
      Last edited by Gary Russell; May 4th, 2012, 02:48 PM.