Missing messages when user is offline

19 views
Skip to first unread message

Jordan Corbman

unread,
Jan 30, 2022, 10:55:40 AMJan 30
to Faye users
Hi all,
I'm using the node.js client to create a connection to an existing faye client

import faye from 'faye';
const client = new faye.Client(config.FAYE_SERVER_URL);
faye.logger = window.console;
client.subscribe(`/user/${user?.id}/subscription`, (msg: string) => {
setLastMessageList([...lastMessageList, msg]);
refreshSubscription();
});

Everything works great when the web browser is online, but I have been trying to test getting missed messages after coming back from offline
1. test to make sure a message is received while online
2. set my connection to "offline"
3. send 2 messages from the publisher
4. set myself back to "online"

At this point I expect to receive the missed messages but nothing happens, even if I send another message, I just get that new one but none of the missed ones.
Is there a piece I'm missing?

Jordan Corbman

unread,
Jan 31, 2022, 11:54:48 AMJan 31
to Faye users
Alternatively, is there an event that fires on reconnect?

James Coglan

unread,
Jan 31, 2022, 8:19:45 PMJan 31
to faye-...@googlegroups.com
Hi Jordan,

Would you be able to share the logs that the subscribing client emits
during this process?

Many thanks,
James
Reply all
Reply to author
Forward
0 new messages