Cannot configure MessagingOptions.ResponseTimeoutWithDebugger via builder extension methods
Perhaps I simply can't find the means but it doesn't seem possible to use either the legacy ClientConfiguration or a new method to set MessagingOptions.ResponseTimeoutWithDebugger. The "Messaging" option in client configuration .xml's are from MessagingConfiguration which doesn't support the field.
As a workaround, I am simply post configuring the ClientMessagingOptions:
var client = new ClientBuilder()
.UseConfiguration(config)
.ConfigureApplicationParts(appParts =>
{
appParts.AddFromApplicationBaseDirectory().WithReferences();
appParts.AddFromAppDomain().WithReferences();
})
#if DEBUG
.ConfigureServices(s => s.PostConfigure<ClientMessagingOptions>(options => options.ResponseTimeoutWithDebugger = TimeSpan.FromSeconds(15)))
#endif
.Build();
Hi Configure ResponseTimeoutWithDebugger through ClientMessagingOption is the correct way. MessagingOptions is the common base class for ClientMessagingOptions and SiloMessagingOptions. But itself shouldn't be used as options/configuration directly. Because one it is an abstract class, so compile wise, call Configure<MessagingOptions> on it would cause compile errors I believe. two we use ClientMessagingOptions and SilOMessagingOptions in our code, configure MessagingOptions won't make changes to either of these two options.
So this is not a bug. With that being said, whether the existence of MessagingOptions is confusing or not is another question. Welcome to share some feedback .
Are you saying .Configure
Presumably, MessagingConfiguration is a remnant of the xml configuration work that is deprecated so I'm not expecting that way to work anymore. I'm just looking for guidance on how you would expect these fields to be configured.
no, PostConfigure is fine, I just wanted to point out configure through MessagingOptions isn't right. Configure through ClientMessagingOptions or SiloMessagingOPtions is the suggested way. Does this make sense?
I got the sense from you that you expect configure through MessageingOtions to work, and suspect it is a bug when it didn't work. Please correct me if I got your intension wrong.
closing due to inactivity. Feel free to reopen if there's further issues