preaction / Mercury

A message broker for WebSockets
Other
10 stars 8 forks source link

Add message acknowledgement #15

Closed preaction closed 8 years ago

preaction commented 9 years ago

For the PUSH/PULL (#14) and REQ/REP (#7) patterns, the receiving side should be able to say that it will acknowledge the message. This should force the broker to keep track of the message, and if the connection to the receiving side is lost, re-send the message to another receiver.

To potentially reduce the amount of resending, we should also allow the receiving side to declare how many messages it wants to handle at once. Only enabling acknowledgement should enable this feature.

preaction commented 9 years ago

These settings should be query parameters when setting up the web socket. ?ack=1 should enable acknowledgement. ?ack=1&max=5 should enable acknowledgement.

There may be backends who have enabled acknowledgement, and backends who have not. We should round-robin amongst them, skipping any backends that are full.

preaction commented 8 years ago

No. This requires an envelope as well. Anything that requires something more formal should be put in another project...