-
Notifications
You must be signed in to change notification settings - Fork 3
Client auto reconnect after connection failure is damaged in 1.5.3 #57
Comments
Can you try with 1.5.5? Thanks, |
Hey Robert, |
You can use proteus-java 1.5.5 and proteus-spring-1.5.3 - but yes - it looks like proteus-spring still transitively pulls in 1.5.3 I will get this fixed. |
Thanks, |
can you share what your integration test does so I can take a look? |
also - are you running the 1.5.3 broker? |
yes, the broker is 1.5.3 |
Hi @VictorVisoki , I forked the proteus spring example, and created a branch: https://github.com/robertroeser/proteus-spring/tree/retry I changed the client to continually retry to send messages. If the broker is down it reconnects. I restarted the broker server times, and the connections on the client and the server both automatically reconnect, and messages start flowing again. This was with 1.5.3. I'm going to need some more context to track down the issue you're having. |
I have a k8s cluster on which the Proteus broker is one of the pods. When I run this setup with proteus-spring 1.5.3, and do couple of restarts to the Proteus pod, 2019-03-19 12:35:51.132 INFO [ parallel-1] .p.DefaultProteusBrokerService selecting socket WeightedClientTransportSupplier{', supplierId=2, errorPercentage=Ewma(value=6.633688616271088E-72, age=1969229), latency=Ewma(value=0.0, age=1083497048), socketAddress=127.0.0.1:8001, activeConnections=0, selectedCounter=1} with weight 6.633688616271088E-72 When I switch back to 1.5.2 it just works fine. |
About the integration test, here's what I'm doing (in Kotlin): @testcontainers
} When the client version is 1.5.3, it simply hangs... |
Hi @VictorVisoki , Thanks for writing back. This makes sense now. There was bug in 1.5.2 that was fixed that would have allowed this to work. At a high level because of the way docker works the Proteus broker needs a private address it binds to and a public address that it advertises clients to connect on. In the meantime I have created an example application that runs on Kubernetes. Here is a link to the application: Here is the YAML I used to configure the brokers. It automatically sets the broker’s public address so that other brokers and clients can find it: Additionally please take a look at a service: This will allow the service to connect to a broker and then start to get a stream of the other brokers. I believe this information should help get the application working correctly. Let me know if you have other questions. Thanks, |
With Proteus client of version 1.5.3 the client won't reconnect to the Proteus server after connection failure, for example when the server was restarted.
It does work well for clients from version 1.5.2, even more:
In a machine with multiple clients, both 1.5.2 and 1.5.3, only the clients of 1.5.2 had survived Proteus server restart (restarted more than 2 times to verify) .
In addition, the ability to use Proteus in integration tests (bringing up a test container with Proteus server) was also damaged. Again, when going back to 1.5.2 it works fine.
The ability to reconnect to the server is critical for applications in production, making it impossible to use the new 1.5.3 version.
The text was updated successfully, but these errors were encountered: