Adjusting the polling interval to check for new messages

To check for new messages that have arrived at a database, the Message Agent (dbremote) polls for new messages. The default polling interval from the end of one poll to the start of another is 1 minute. You can configure the polling interval using the -rd option, but the default is generally sufficient.

Decreasing the polling interval

You can poll more frequently by using a value in seconds. For example, the following command polls every thirty seconds:

dbremote -c "DSN=SQL Anywhere 11 Demo" -rd 30s

In general, do not use a small polling interval unless you have a specific reason for requiring a very quick response time for messages. Setting a very small interval can have a detrimental effect on overall system throughput because:

  • You can waste resources polling when no messages are in the queue. For example, if you are using email, each poll of the mail server places a load on your message system. Too frequent polling may affect your message system and produce no benefits.

  • You can overload your system with resend requests. When adjusting the polling interval, you should also adjust the Message Agent (dbremote) patience. The patience is the number of polls the Message Agent (dbremote) waits for an out-of-sequence message to arrive before requesting that it be sent again. See Adjusting the requests to resend messages.

Increasing the polling interval

You can poll less frequently, as in the following command, which polls every five minutes:

dbremote -c "DSN=SQL Anywhere 11 Demo" -rd 5

Setting larger polling intervals can provide a better overall throughput of messages in your system, it can increase the time it takes to apply an individual messages. For example, if your polling period for incoming messages is too long, compared to the frequency with which messages are arriving, you can end up with messages sitting in the queue, waiting to be processed.

See also