Namespace ProtoTest.Messaging

Classes

MessagingAttachmentOptions

Controls whether published and received message payloads are captured as test attachments. Payloads are redacted through JsonDiagnosticSanitizer and capped at MaxDiagnosticBodyLength. Non-Json payloads are captured as plain text. Binds from ConfigurationSectionName.

MessagingOptions

Messaging defaults, layered from ProtoTest:Messaging over the code-based registration.

MessagingShapeMatchData

Shape-match data attached to a messaging.contract.shape observation.

ProtoExecutionContextExtensions
ProtoHostBuilderExtensions
ProtoMessage

A message observed on or sent to a broker. Adapters map their technology's message onto this shape; the test-side API and the trace never see a broker-specific type.

ProtoMessageClient

The test-side messaging API over the configured broker. Publishes and awaits are traced as messaging.publish and messaging.await operations with the payload as a section, and recorded as observations so coverage can aggregate destinations.

ProtoMessagingAssertions

Shape assertions for consumed messages, reusing the Json shape matcher the REST, GraphQL and gRPC integrations use. A message payload is Json by convention, so an expected anonymous shape reads the same way as elsewhere.

ProtoMessagingBuilder

Interfaces

IProtoMessageBroker

The broker capability's state-free adapter contract. The capability owns the broker resource and the trace-facing API; an adapter owns the client technology (RabbitMQ today, others later). One broker is shared by the whole run and may publish concurrently, while every test gets its own IProtoMessageConsumer.

IProtoMessageConsumer

One test's view of a broker, created by CreateConsumerAsync(CancellationToken) during setup and disposed with the test's teardown. A consumer belongs to exactly one test: it must never be shared, and its disposal removes whatever the adapter declared for the test (queues, in RabbitMQ's case), so parallel tests on the same destination cannot steal each other's messages.