retryPendingMessages

Sends every message pending for remote again, oldest first, and returns the IDs whose new envelope the transport took. Each attempt is a fresh encryption under the current session with a new envelope ID; the logical ID stays. Messages stay pending until remote acknowledges them, which it does only after its application committed them (docs/application-delivery.md), so calling this again sends them again. Before that commit the recipient delivers the retry again as the same message; after it, the recipient only acknowledges it again.

The client never keeps a session it knows lost a collision, so a retry always uses the session this device currently has. Call it after processing received envelopes, for example after a SecureMessageClientException.SessionCollision or once the application suspects a lost acknowledgement. There is no automatic retry.

Stops at the first envelope the transport does not take, with SecureMessageClientException.MessageNotSent: sending later messages first would change their order. Encryption failures are thrown as they are and leave that message pending and its session unchanged.

Each message is read and encrypted in its own transaction, so a message acknowledged meanwhile is skipped. An abandoned message (abandonPendingMessage) is never sent again; one abandoned after its envelope was handed off may still be delivered (docs/outbound-message-lifecycle.md).