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 » Setting Up QAnywhere Messaging » Setting up client-side components » Running the QAnywhere Agent

Running the QAnywhere Agent Next Page

Determining when message transmission should occur on the client


On the client side, you determine when message transmission should occur by specifying policies. A policy tells the QAnywhere Agent when a message should be moved from the client message store to the server message store. If you do not specify a policy, transmission occurs automatically when a message is queued for delivery to the server by default. There are three pre-defined policies: scheduled, automatic, and ondemand, as well as a custom policy.

You can specify policies in two ways:

Scheduled policy

The scheduled policy instructs the Agent to perform a transmission at a specified time interval.

To invoke a schedule, choose scheduled in the command file Properties dialog or specify the keyword when you start the QAnywhere Agent:

qaagent -policy scheduled [ interval ] ...

where interval is in seconds.

The default is 900 seconds (15 minutes).

When a schedule is specified, every n seconds the Agent performs message transmission if any of the following conditions are met:

You can call the trigger send receive method to override the time interval. It forces message transmission to occur before the time interval elapses. See:

Automatic policy

The automatic policy attempts to keep the client and server message stores as up-to-date as possible.

When using the automatic policy, message transmission is performed when any of the following conditions occurs:

Ondemand policy

The ondemand policy causes message transmission to occur only when instructed to do so by an application.

An application forces a message transmission to occur by calling TriggerSendReceive().

When the agent receives a Push Notification or a Network Status Change Notification, a corresponding message is sent to the system queue. This allows an application to detect these events and force a message transmission by calling TriggerSendReceive(). See:

For more information about handling push notifications and network status changes, see System queue.

Custom policy

A custom policy allows you to define when message transmission occurs and which messages to send in the message transmission. The custom policy is defined by a set of transmission rules.

Each rule is of the following form:

schedule = condition

where schedule defines when condition is evaluated. For more information, see Rule syntax.

All messages satisfying condition are transmitted. In particular, if schedule is automatic, the condition is evaluated when any of the following conditions occurs:

See also