2 Commits

Author SHA1 Message Date
Jacob Alber
41e7e85c40
fix: Improve PublishMessageAsync resilience (#5923)
During the recent fix to SendMessageAsync's recurrence, we added code to ensure blocking on Publish. This adds additional resilience to the Publish delivery, ensuring that every subscribed agent receives the message, regardless of errors in the middle.
2025-03-13 16:53:21 -04:00
Jacob Alber
0a988b6393
fix: Recurrent SendMessageAsync deadlock in message handler (#5916)
In the .NET InProcessRuntime we tried to minimize the amount of tasks
created. Unfortunately, this results in a deadlock when a send message
handler is attempting to SendMessage during the handling of the incoming
message.

The fix is to create a new task for delivering the message in the
message processing loop, which creates a new logical stack to run the
delivery, freeing the loop to process the next delivery request.

* Also fixes passing exceptions and cancellations back to the waiting
task.
* Also fixes a build slowdown on Windows due to uv and llama-cpp

Closes #5915
2025-03-12 14:58:07 -04:00