zhfeng commented on a change in pull request #5762:
URL: https://github.com/apache/camel/pull/5762#discussion_r660286359



##########
File path: 
components/camel-jms/src/main/java/org/apache/camel/component/jms/StreamMessageInputStream.java
##########
@@ -48,6 +48,11 @@ public int read() throws IOException {
     public int read(byte[] array) throws IOException {
         try {
             int num = message.readBytes(array);
+            if (num < 0) {
+                //the first 128K(FileUtil.BUFFER_SIZE/128K is used when 
sending JMS StreamMessage) 
+                //buffer reached, give a chance to see if there is the next 
128K buffer
+                num = message.readBytes(array);
+            }

Review comment:
       I suggest to remove the next line
   ```
   eof = num  < 0;
   ```
   since we can not to see the eof if the num is -1 because there will be more 
chunks. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to