dotnetcore / CAP

Distributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern
http://cap.dotnetcore.xyz
MIT License
6.61k stars 1.28k forks source link

Callback on IIS Idle state #1548

Closed carlosxjose closed 2 months ago

carlosxjose commented 2 months ago

We've been testing the latest preview 8.2.0-preview-234883029 which introduce the new CapHeader approach... We rewritten all our methods reducing publishing messages among the apps with RewriteCallback("CallbackName").

However we have notice that, if the app A subscribed with the CallBackName is on Idle mode it's doesn't trigger the app or consume the message. We re-executed a message from app B dashboard and the receiver app A never started. Then after I activated app A requesting an endpoint and re-executed again app B then worked as it should.

The IIS is running the default 20 minutes idle time-out mode... Is there any best practice we could implement or reconfigure? Otherwise we have to come back to publish messages and remove the callback approach...

Thanks

yang-xiaodong commented 2 months ago

See https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/advanced?view=aspnetcore-8.0#idle-timeout

carlosxjose commented 2 months ago

After I wrote this discussion, i found and tested the same link you just shared from microsoft, and the apps are still running... Now I have to do the same or equivalent configurations for the cloud based on Azure, besides the local one on IIS already resolved...

Thanks for sharing it.