Broker 10.5 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | Message Streaming | Supporting Interfaces | C#
*Interfaces to IMessageProducer, which has a method returning class MsgOutputStream. You can use the class to write data.
*Interfaces to IMessageConsumer, which has a method to read data from the class MsgInputStream.
Implementation of the streaming API introduces two new classes: MsgInputStream and MsgOutputStream. These extend the stream class and are returned by IMessageConsumer.getInputStream() and IMessageConsumer.getOutputStream().
The MsgOutputStream class streams data written to it by packaging the data and sending it to the message producer's destination using a 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 MsgInputStream class asynchronously receives the BytesMessages and makes the data available when the stream is read.
Once the MsgOutputStream is closed, a final BytesMessage is sent with the provider-specific Boolean property JMS_WM_END_OF_STREAM set to true. When this is received by the MsgInputStream class, it will return 0 from read() indicating that the end of the stream has been reached.