Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-2650

TCP Endpoint - using SpEL in Spring 3.1 to convert byte[] to byte[] - high cpu load and handle time delay



      Configured tcp endpoint with tcp-gateway and simple service activator, which takes byte array as an argument. Transfer large binary files through the the endpoint (incoming). Using ByteArrayLengthHeader as serializer/deserializer.
      Using function

      public byte[] handleBinary(byte[] msg)

      for service activator.
      During transfer of binary files very high cpu load and there is a large tome gap between spring-integration activator functions eg.

      23:54:31,789 DEBUG: org.springframework.integration.handler.ServiceActivatingHandler - ServiceActivator for [org.spr[email protected]4f3e0c] received message: [Payload=[[email protected]][Headers={timestamp=1341179671789, id=e994c61f-9694-4ea7-87c3-fca11ff334b3, errorChannel=org.springfra[email protected]42df6c, ip_address=, replyChannel=org.springfra[email protected]42df6c, ip_hostname=, ip_connection_seq=9, ip_tcp_remote_port=41188, ip_connection_id=}]
      23:54:32,454 DEBUG: [..package..].integration.BinaryActivator - Binary Handler: Handle binary object. Payload size: 1024005

      Caused by using in Spring 3.1 automatic conversion for SpEL arguments, which SI is using. Details with a solution from garry russel in the reference URL post.
      In the attachement jstack dump of the process during high cpu load.

        Issue Links


          There are no comments yet on this issue.


            • Assignee:
              grussell Gary Russell
              slawek.mikula Slawek Mikula
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: