My application is a microservice application. I am using spring web sockets to send notifications to the front end. In my application, I have a gateway service to route the HTTP requests to the relevant service which uses Spring Cloud Gateway Global filter, and I am using same Spring Cloud Gateway to route the web socket connection to the relevant microservice. But Spring Cloud Gateway closed my web socket connection after 30 seconds. Hence I was unable to use the web socket. How to increase or remove this timeout?
To route the WebSocket connection to the relevant service I have used the following routes.
spring:
cloud:
gateway.routes:
- id: websocket_route
uri: wss://websocket-service-svc/**
predicates:
- Path=/api/v1/websocket-service/ws-websocket
Is there any way to remove the time-out configuration or increase the timeout time?