Application Code
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.