Class ProtoHostBuilderExtensions
public static class ProtoHostBuilderExtensions
- Inheritance
-
ProtoHostBuilderExtensions
- Inherited Members
Methods
AddMessaging(IProtoHostBuilder, Action<ProtoMessagingBuilder>?)
Adds the messaging capability: publish and await messages over a broker. Without an adapter the run uses the in-memory broker, so the API works anywhere; a real adapter replaces it, registers the Broker capability and is released with the run as an owned resource.
public static IProtoHostBuilder AddMessaging(this IProtoHostBuilder builder, Action<ProtoMessagingBuilder>? configure = null)
Parameters
builderIProtoHostBuilderconfigureAction<ProtoMessagingBuilder>
Returns
Remarks
A repeated call is not a no-op: its configure callback always runs, so a later call can add
an adapter to an adapter-less first call or refresh attachment options. Infrastructure is
idempotent (one holder, initializer, capability and run resource) and the first adapter wins; a
call whose configure throws leaves no guard behind, so a later successful call still composes.