Broker 10.5 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | Coding Messaging Client Applications | C# Messaging Clients | Application Code
 
Application Code
 
Implementing an Asynchronous Message Listener
Building the Query (Request) Message
Linking a Reply to a Request Message
Implementing a Local Transaction
Using a Message Selector
Implementing Messaging on a Second Thread
This section describes the application code, focusing on the application's C# messaging functionality. The code descriptions focus on the following areas:
*Implementing an asynchronous message listener. The asynchronous message listener receives customer inquiry messages and is installed on the server.
*Linking a reply to a request message. The reply message, which contains the results of the customer inquiry, and is linked through message header fields to the original request.
*Implementing a local transaction. The request message for customer information, and its reply message and acknowledgment are grouped into a local transaction.
*Using a message selector. The message selector determines whether a customer request will be received, based on the Boolean expression specified by the selector.
*Receiving messages on a second thread. The example includes a second session and a message consumer with a synchronous receive() method that manages the reception of an administrator message on a second thread.