pendingReceivedMessages
One page of the received messages the application has not finalized yet, with their plaintext (docs/message-discard.md): at most limit (1..PendingReceivedMessagePage.MAX_SIZE) messages with a ReceivedMessage.sequence greater than afterSequence (from the start if null), from sender only if given, in ascending sequence order. Call it after a restart: a message stays pending until commitReceivedMessage or discardReceivedMessage, whether or not its sender sends it again.
The cursor is the sequence number, never an offset: messages finalized between pages do not shift later pages, and no message is returned twice by one enumeration. Each page is read in its own transaction; an enumeration is not a snapshot, so messages accepted meanwhile (higher sequence numbers) can appear on later pages. A sender filter uses the same global sequence as cursor.
Throws IllegalArgumentException for a limit outside 1..PendingReceivedMessagePage.MAX_SIZE or a negative afterSequence.