Reputation: 3941
I have a simple rest endpoint that is searching for a message in a Kafka topic. Depending on when/if this message is found, this process could take a couple minutes. When I call this endpoint via Swagger I end up receiving a 504 - Server Timeout
back. How can I keep this connection alive so the client doesn't receive a timeout?
Upvotes: 0
Views: 1060
Reputation: 18824
Dropwizard will let you configure the idleTimeout (defaults to 30 seconds), see configuration reference
But I must warn you this is a dangerous path with issues like:
If your process needs more time then there are some solutions like: 1. Websockets (notify the client when the operation completed) 2. Long polling (periodically poll the server for completion result)
Upvotes: 1