Broker 10.5 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | Message Streaming | Example | C#
 
C#
// Create a non-transacted session.
Session sess = connection.createSession(false, Session.AUTO_ACKNOWLEDGE)
 
// Create a message consumer.
IMessageConsumer consumer = sess.createConsumer(topic);
MsgInputStream consumer is = consumer.getInputStream();
 
// Wrap the message consumer’s input stream in an audio stream.
AudioStream as = new AudioStream(as);
 
// Start the audio player.
AudioPlayer.player.start(as);