I'm building an archiving app for Groupwise 8, and have run into the following subtle though fundamental error in the way my app interoperates with the Groupwise SOAP API.

As far as I understand (partly according to the docs, Novell Documentation), the way to do archiving in Groupwise is as follows:

  • With a Trusted App Key, get a list of all users in the system
  • Then, for each user:

  1. login
  2. execute a getTimestampRequest to get the retention timestamp for the mailbox
  3. create a cursor that returns all messages that were created after and not including that timestamp
  4. pull in all the messages returned by the cursor
  5. set the retention timestamp on the mailbox to the creation date of the newest message in the cursor
  6. logout

Ok, so here's the subtle bug that results from following this process. I've implemented a configurable limit for the amount of messages a cursor returns which, let's say for the sake of argument, is set to 1000.
If I send 500 testmessages to the server, and then run our archiving app, everything works beautifully. All messages are extracted and archived. But if I send more than the limit, let's say 1100, forcing the messages to be split over 2 runs of our app (or 2 cursors, if you will), nearly a dozen messages seem to go missing every time.

My question is the following: why are we losing this tiny amount of messages when the entire batch is split over 2 cursors?

Is it because the timestamp set on the mailbox is not finegrained enough to distinguish between two messages that arrived at essentially the same time?

Let's say that the resolution of the timekeeping in Groupwise is such that 5 messages can arrive and be assigned the exact same creation time. Any cursor, like ours, that's looking for messages created *after* a certain time, would then miss messages. If a cursor is created that includes message X, but right after the cursor creation, 4 more message arrive with the same create time as X, those would be missed by the next cursor that is used (as it would only look at messages created after X's creation time).

I hope I'm making some sense, and that someone can help me out. I imagine that this is something that other people have run in to with their own archiving apps.

Thanks in advance,