Hello,
Regarding the bug posted at
https://issues.apache.org/activemq/browse/SM-944(it was submitted by
Anne Noseda)...
Is there another workaround when sendSync() cannot be used, because I need
to "stream" a long attachment? Or can I simply discard the error?
I am receiving the same error as Ms. Noseda.
InOnly inOnly = exchangeFactory.createInOnlyExchange();
inOnly.setService(...);
inOnly.setOperation(...);
NormalizedMessage message = inOnly.createMessage();
PipedInputStream pipedInputStream = new PipedInputStream();
pipedOutputStream = new PipedOutputStream(pipedInputStream);
message.addAttachment("text", new DataHandler(new StreamDataSource(null,
pipedInputStream, null, null)));
inOnly.setInMessage(message);
channel.send(inOnly);
bufferedOutputStream = new BufferedOutputStream(pipedOutputStream);
outputStreamWriter = new OutputStreamWriter(bufferedOutputStream);
bufferedWriter = new BufferedWriter(outputStreamWriter);
...
Thank you!
Andre Powroznik
--
André Powroznik
Rue Joseph Servais 57
B-4430 Ans
GSM : (32-474) 44 86 28