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 Answer
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
EXPERT
Uri
answered 10 months ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions