I try to use socketCluster with acknowledgment in NodeJS.
I follow the code in this page: https://socketcluster.io/docs/basic-usage/
[Server] Publish to a channel and wait for acknowledgement
(async () => {
try {
// Publish data; wait for an acknowledgement from the back end broker (if it exists).
await agServer.exchange.invokePublish('foo', 'This is some more data');
} catch (error) {
// ... Handle potential error if broker does not acknowledge before timeout.
}
})();
But I don't get an acknowledgment and I don't know what is missing. I have tried uploading the socket cluster server with this option {ackTimeout: 10000}, but it didn't help. How do I know if the message was received?