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 回答
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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则