[undertow-dev] Websocket proxy: monitor (in)activity

Frederick Michielssen frederick.michielssen at openanalytics.eu
Thu Jun 23 05:52:32 EDT 2016


Hi Stuart,

Thanks for the pointer.
This appears to work, but what I would like to do next, is to perform additional actions when the websocket closes.
At first glance, I would use DeploymentInfo.addSessionListener, but these sessions will expire (and call sessionDestroyed) regardless of websocket activity, right?

- Frederick

----- Original Message -----
From: "Stuart Douglas" <sdouglas at redhat.com>
To: "Frederick Michielssen" <frederick.michielssen at openanalytics.eu>
Cc: "undertow-dev" <undertow-dev at lists.jboss.org>
Sent: Monday, June 20, 2016 2:57:18 AM
Subject: Re: [undertow-dev] Websocket proxy: monitor (in)activity

Are you using Wildfly or embedded Undertow?

Either way you basically want to set an idle timeout on the conduit.
Setting io.undertow.UndertowOptions#IDLE_TIMEOUT should do it, if you
are using the embedded builder you need to call setServerOptions with
this setting and your timeout, if you are using wildfly you need to
set in on the listener in standalone.xml.

Stuart

On Fri, Jun 17, 2016 at 11:50 PM, Frederick Michielssen
<frederick.michielssen at openanalytics.eu> wrote:
> Hi,
>
> Our application uses Undertow to serve a Spring-boot application, as well as proxy websocket connections to a backend server.
> Now we would like to monitor activity on the websocket, so that specific resources can be freed when the websocket has been inactive for a long time.
> Is there an appropriate way we can detect this in Undertow? Maybe some timeout setting that can be used for this purpose?
>
> -Frederick
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev


More information about the undertow-dev mailing list