Client Acknowledgement for GraphQL Subscriptions Event #639
KelltonTechSolutions
started this conversation in
General
Replies: 1 comment 1 reply
-
Hey there, what was the suggested approach you came across? Is the "ws server and client usage with subscription acknowledgment" recipe something you can find useful? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Everyone,
We are currently in the process of implementing GraphQL subscriptions to push critical events to clients. Ensuring reliable delivery is essential, and to achieve this, we intend to track successful event delivery by receiving acknowledgment (ACK) messages from clients. This acknowledgment mechanism will also allow us to safely commit the corresponding events in the source system (Kafka).
Upon reviewing the documentation and community forums, it appears that the graphql-ws library does not natively support ACK handling. However, I came across a suggested approach that involves opening a socket listener to capture and process ACK messages before invoking useServer.
I attempted this implementation and observed that while ACK messages are received, the WebSocket connection is unexpectedly closing afterward.
Would you happen to have any reference implementations that demonstrate a working acknowledgment mechanism? Alternatively, any guidance or best practices for implementing this pattern would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions