Broker 10.15 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | Message Streaming | Supporting Interfaces | JMS
 
JMS
*Extensions to WmMessageProducer, which has methods to get the output stream object. In the message stream, there is a method to write data to the message producer.
*Extension to WmMessageConsumer, which has a method to get the input stream object. In the message stream, there is a method to read data from a message consumer.
Implementation of the streaming API introduces two new classes: WmJMSInputStream and WmJMSOutputStream. These classes extend the java.io.InputStream and java.io.OutputStream classes, and are returned by WmMessageConsumer.getInputStream() and WmMessageProducer.getOutputStream().
The WmJMSOutputStream class streams data written to it by packaging the data into 1 Mb chunks and sending the data to the message producer's destination using a JMS BytesMessage. The quality of service (persistent or non-persistent), along with priority and expiration, will be the same as those set for the message producer. The WmJMSInputStream class asynchronously receives the BytesMessages and makes the data available when the stream is read.
Once the WmJMSOutputStream is closed, a final BytesMessage is sent with the provider-specific Boolean property JMS_WM_END_OF_STREAMset to true. When this is received by the WmJMSInputStream class, it will return -1 from read() to indicate that the end of the stream has been reached.