Skip to content

A failed resume incorrectly retries queued messages prior to reattachment #905

@paddybyers

Description

@paddybyers

When handling a failed resume in accordance with RTN15c3 (https://github.com/ably/specification/blob/ee511f8a62e3e09cdd2ce50fadddb2d66f2ebaa3/textile/features.textile#RTN15c3), the ConnectionManager processes outstanding queued messages via `ConnectionManager.queuedMessages (

addPendingMessagesToQueuedMessages(true);
).

However, these messages instead need to be requeued at the Channel level, so that they are correctly processed relative to the re-attach that happens. (Currently, replayed presence messages are reattempted before the channel attach has completed.)

Normal Messages need to be removed from ConnectionManager.queuedMessages and ConnectionManager.pendingMessages and put back into ChannelBase.queuedMessages (

queuedMessages = new ArrayList<QueuedMessage>();
)

Presence messages need to be removed from ConnectionManager.queuedMessages and ConnectionManager.pendingMessages and put back into Presence.pendingPresence (

private final Map<String, QueuedPresence> pendingPresence = new HashMap<String, QueuedPresence>();
)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working. It's clear that this does need to be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions