How to reconnect? (Deadlock when reconnecting)
See original GitHub issueIf i turn off one node i get timeout exception and crush my app. What i do wrong?
var cf = new StanConnectionFactory();
var opts = StanOptions.GetDefaultOptions();
opts.NatsURL = "nats://127.0.0.1:4222,nats://127.0.0.1:4223,nats://127.0.0.1:4224";
using (var c = cf.CreateConnection("test-cluster", "appname", opts))
{
using (c.Subscribe("foo", (sender, handlerArgs) => Console.WriteLine(
System.Text.Encoding.UTF8.GetString(handlerArgs.Message.Data))))
{
while (true)
{
c.Publish("foo", System.Text.Encoding.UTF8.GetBytes("hello"));
await Task.Delay(300);
}
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Warning: The connection was closed. Trying to reconnect ...
Trying to reconnect There was a deadlock when executing this statement. ... 2017-04-11 04:08:39 +02:00 - Warning: The connection was closed.
Read more >sql - Deadlock, Connection to the database is dropped
The only way to stop it is to figure out why the deadlocks are occurring in the first place. You can run a...
Read more >Reconnecting with Persistent Locks
Once the connector is reassigned its persistent locks, the locks are no longer persistent. They are ordinary locks subject to normal serialized list...
Read more >How can I narrow down the cause of a deadlock after ...
We're using a .Net 4.5 web application with SQL Server 2012 on the same machine. We will sporadically see a cluster of "Wait...
Read more >Nest × Yale Lock disconnected or offline
On the Nest app home screen, tap Settings Nest settings icon and then Nest Connects. · Select your Nest Connect and then Check...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I set try{}catch and i want on second try get reconnected producer, but reconnect not happen… It is only working when I set nats options.
Why reconnect don’t working with Stan pattern.
How do i can have reconnect with Stan classes only?
Thanks! 😉