Requesting resends

If, when the Message Agent polls for incoming messages, one message is missing from a sequence, the Message Agent does not immediately request that the message be resent. Instead, it has a default patience of one poll.

If the next message expected is number 6 and message 7 is found, the Message Agent takes no action until the next poll. Then, if no new message for that user is found, it issues a resend request.

You can change the number of polls for which the Message Agent waits before sending a request using the -rp option. This option is often used in conjunction with the -rd option that sets the polling interval.

For example, if you have a very small polling interval, and a message system that does not preserver the order in which messages arrive, it may be very common for out-of-sync messages to arrive only after two or three polls have been completed. In such a case, you should instruct the Message Agent to be more patient before sending a resend request, by increasing the -rp value. If you do not do this, a large number of unnecessary resend requests may be sent.

Example

Suppose there are two remote users, named user1 and user2, and suppose the Message Agent command line is as follows:

dbremote -rd 30s -rp 3

In the following sequence of operations, messages are marked as userX.n so that user1.5 is the sixth message from user1. The Message Agent expects messages to start at number 1 for both users.

At time 0 seconds:

  1. The Message Agent reads user1.1, user2.4
  2. The Message Agent applies user1.1
  3. The Message Agent patience is now user1: N/A, user2: 3, as an out of sequence message has arrived from user 2.

At time 30 seconds:

  1. The Message Agent reads: no new messages
  2. The Message Agent applies: none
  3. The Message Agent patience is now user1: N/A, user2: 2

At time 60 seconds:

  1. The Message Agent reads: user1.3
  2. The Message Agent applies: no new messages
  3. The Message Agent patience: user1: 3, user2: 1

At time 90 seconds:

  1. The Message Agent reads: user1.4
  2. The Message Agent applies: none
  3. The Message Agent patience user1: 3, user2: 0
  4. The Message Agent issues resend to user2.

When a user receives a new message, it resets the Message Agent patience even if that message is not the one expected.