Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consumer Client Timeout #13

Open
y2kbowen opened this issue May 21, 2015 · 1 comment
Open

Consumer Client Timeout #13

y2kbowen opened this issue May 21, 2015 · 1 comment

Comments

@y2kbowen
Copy link

I have a Java client subscribing to a topic and the client has the socket closed after 5 minutes. I was expecting my client to have a persistent connection until it ended the session (maybe this is not the intended use for consumer?)The jetty socket default is that time. The service log shows

[DEBUG] 2015-05-21 13:43:50,319 org.eclipse.jetty.io.IdleTimeout checkIdleTimeout - SelectChannelEndPoint@7915e83{/192.168.80.1:63140<->7080,Open,in,out,R,-,300000,WebSocketServerConnection}{io=1,kio=1,kro=1} idle timeout check, elapsed: 300001 ms, remaining: -1 ms
[DEBUG] 2015-05-21 13:43:50,319 org.eclipse.jetty.io.IdleTimeout checkIdleTimeout - SelectChannelEndPoint@7915e83{/192.168.80.1:63140<->7080,Open,in,out,R,-,300000,WebSocketServerConnection}{io=1,kio=1,kro=1} idle timeout expired

I tried adding connector.setIdleTimeout(-1) to KafkaWebsocketServer.java but that did not change the result. The code I added looks like this:

    public void run() {
    try {
        Server server = new Server();
        ServerConnector connector = new ServerConnector(server);
        connector.setPort(Integer.parseInt(wsProps.getProperty("ws.port", DEFAULT_PORT)));
        connector.setIdleTimeout(-1);

Maybe the version of Jetty does not support infinite? I did find this article and the code shows a slightly different way of setting the server timeout but the comment at the bottom indicates what I did as the best result.

@MrPl0p
Copy link

MrPl0p commented Jul 30, 2019

Any solution found for this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants