Class ProtoMessagingBuilderExtensions

Namespace
ProtoTest.Messaging.RabbitMq
Assembly
ProtoTest.Messaging.RabbitMq.dll
public static class ProtoMessagingBuilderExtensions
Inheritance
ProtoMessagingBuilderExtensions
Inherited Members

Methods

UseRabbitMq(ProtoMessagingBuilder, Action<RabbitMqOptions>?)

Uses RabbitMQ as the broker: publish to exchanges named like the destination, await on a tap prepared for the destination before the act. The connection comes from ProtoTest:Messaging:RabbitMq:ConnectionString, so a deployed run only changes configuration. The configure callback runs exactly once, when this call registers; the instance it configured is the one the run resolves.

public static ProtoMessagingBuilder UseRabbitMq(this ProtoMessagingBuilder messaging, Action<RabbitMqOptions>? configure = null)

Parameters

messaging ProtoMessagingBuilder
configure Action<RabbitMqOptions>

Returns

ProtoMessagingBuilder

Remarks

The Broker capability is declared conditionally on that key: a run whose address comes from configuration or from a registered broker container keeps the capability, while a run with neither loses it, so [RequiresCapability(ProtoCapabilityKinds.Broker)] skips instead of failing at setup or first publish. A callback that sets ConnectionString itself provides the address in code, so the capability stays unconditional.