tomasfabian / Joker

Reactive data changes from SQL server to .NET clients. SqlTableDependency extensions, Joker.OData, Joker.Redis, Joker.MVVM and ksqlDB LINQ provider
MIT License
69 stars 23 forks source link

Maintain conversation #9

Closed mbowles201 closed 3 years ago

mbowles201 commented 4 years ago

Not an issue, per se. We are using SqlTableDependency have an issue with the drop and recreate of triggers and broker items each time it "hiccups" A windows service makes use of the project to listen to the broker. If our service idels or drops and has to be restarted, the drop and create from SqlTableDependecny fires...during that time, the db is nearly unusable. Your extension mentions the ability to maintain that conversation handle. Would your extension help us in those situations?

tomasfabian commented 4 years ago

Hi @mbowles201 the best way how to find this out is to try it in your environment. My extension tries to reestablish the same conversation handle as before within a specified period. This period can be set, but be aware that the message queue will grow during this period, in case that the messages won't be consumed by your service. These messages could overwhelm your service after reconnection, so please try this out, too.

I hope this will be somehow helpful to you. Let us know how did you manage your issue. Thank you, Tomas

mbowles201 commented 3 years ago

Thanks! I will give that a whirl as soon as I go through the "how to" section. Really dont want to alter anything except to add the "reconnect" capability. Is this package used in place of or along with SqlTableDependency? We used SqlTableDependency rather simply.

SqlTableDependency<Product> prod;
using(prod = new SqlTableDependency<Product>(connStrnig, "Products"))
{
   prod.OnChanged =+ ChangeProductEvent;  // this acts on the incoming broker msg
   prod.Start();
   while(true);
}

I simply need to implement your extension to gain the "reconnect" capability, so I am off to VS.

Thanks again.

tomasfabian commented 3 years ago

This package extends SqlTableDependency.

tomasfabian commented 3 years ago

Closed due to inactivity