I have a simple program that sends a stream to a queue,
…
OutputStream out = connection.createOutputStream(destination);
File file = new File("D:/file.xml");
FileInputStream fis = new FileInputStream(file);
int l;
byte[] array = new byte[1024];
while ( (l = fis.read(array)) != -1 ){
out.write(array);
}
And in the other side a simple program who receive the stream:
InputStream fis = connection.createInputStream(destination);
FileOutputStream out = new FileOutputStream("D:/Newfile.xml");
int l;
byte[] array= new byte[1024];
while ((l = fis.read(array)) > 0) {
out.write(array);
}
The problem is that activeMQ is putting more bytes to the stream, for
example I have run these programs with the following input (file.xml):
1
2
3
4
5
6
7
8
9
And I obtain the following file (NewFile.xml)
1
2
3
4
5
6
7
8
9
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
note: the line above are the byte added by activeMQ
What could be this?
--
View this message in context:
http://www.nabble.com/Possible-bug-in-activeMQ4.1.0-with-Streams--tf3139553.html#a8702029
Sent from the ActiveMQ - User mailing list archive at Nabble.com.