ApiGateway WebSocket - How to override requestId? Or any other way to get reception confirmation of messages sent.

0

Hi, ApiGateway docs says that it is possible to override requestId with HTTP by overriding a header. But it says nothing about a way to do it when using websockets. How can i override requestId to get confirmation that message was well received? by requestId or any other solution identifying my sent message, It must be handled directly by ApiGateway, and not depending on a Lambda triggered or any consuming processing... I already have a integration response, and get for exampleconnectinId properly, but the requestId being generated by ApiGateway itself, i cant indetify back the sent message myself. Thanks

已提問 1 年前檢視次數 261 次
1 個回答
0

When using WebSockets, the connection is established once using HTTP. From that point you send messages over the existing connections, not using HTTP protocol, so there are no HTTP headers and there are no request IDs.

There might be some ACK in the web sockets protocol itself, but if you want to be sure, you need to send an ACK from the backend.

profile pictureAWS
專家
Uri
已回答 1 年前
  • Thanks, ok but i thought that AWS Apigateway had a way to override responseID in the socket messages itself. as it will already read the json in the sent message to get the route name, it could also read a requestID to use it instead of generating one.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南