Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » QAnywhere » Tutorial: Exploring TestMessage

Lesson 1: Start MobiLink with messaging Next Page

Lesson 2: Run the TestMessage application


Background

TestMessage is a simple application that uses QAnywhere to send and receive text messages. Text messaging is used in this tutorial because it provides a simple and accessible demonstration of messaging. QAnywhere is, however, not just a text messaging system; it provides general purpose application-to-application messaging.

In this lesson, you are carrying out activities at a client. Typically, clients run on separate computers from the server.

In this lesson, you start the client message store that is part of the TestMessage sample. In Lesson 3, you will use this message store to send a message to another client message store.

Activity
To start the QAnywhere Agent with the TestMessage client message store
  1. From the Start menu, choose Programs > SQL Anywhere 10 > QAnywhere > Agent for Client1 Sample.

    This starts an instance of the QAnywhere Agent. This Agent connects to the first TestMessage sample client message store and manages message transmission to and from this message store.

  2. Move the first QAnywhere Agent window to the right side of your screen, which represents the first client in this tutorial.

  3. From the Start menu, choose Programs > SQL Anywhere 10 > QAnywhere > Agent for Client2 Sample.

    This starts another instance of the QAnywhere Agent. This Agent connects to the second TestMessage sample client message store and manages message transmission to and from this message store.

  4. Move the second QAnywhere Agent window to the left side of your screen, which represents the second client in this tutorial.

  5. Each of the QAnywhere Agent windows displays a client message store ID, called client1 and client2.

To start TestMessage
  1. From the Windows Start menu, choose Programs > SQL Anywhere 10 > QAnywhere > TestMessage for Client1 Sample.

    The TestMessage window is displayed. The application is connected to the first TestMessage client message store that you started in the above procedure.

  2. Move the TestMessage window to the right side of your screen, together with the first QAnywhere Agent. Both these components belong on the first client.

  3. Check the message queue.

    From the TestMessage - client 1 Tools menu, choose Options. You will see that the queue name testmessage is specified. This is the queue that the TestMessage application is listening on for incoming messages. Do not change this name.

  4. From the Windows Start menu, choose Programs > SQL Anywhere 10 > QAnywhere > TestMessage for Client2 Sample.

    The TestMessage window is displayed. The application is connected to the second TestMessage client message store that you started in the above procedure.

  5. Move the TestMessage window to the left side of your screen, together with the second QAnywhere Agent. Both these components belong on the second client.

  6. Check the message queue.

    From the TestMessage - client 2 Tools menu, choose Options. You will see that the queue name testmessage is specified. This is the queue that the TestMessage application is listening on for incoming messages. Do not change this name.

Discussion

You can configure the way that the QAnywhere Agent monitors messages by setting a message transmission policy. This sample is designed to only work with the automatic or scheduled policy, and it starts the QAnywhere Agent using the automatic policy. The QAnywhere policies are:

QAnywhere messages are delivered to a QAnywhere address, which consists of a client message store ID and a queue name. The default ID is the computer name on which the QAnywhere Agent is running. Each message store requires its own QAnywhere Agent. Each application can listen to multiple queues, but each queue should be specific to a single application.

Further reading