Class ProtoDestination
The messaging destination addressing forms. An exchange destination is the bare name the surface
has always spoken: publishing sends to that exchange and awaiting binds the test's tap to it. A
queue destination is queue:{name}: it names the queue itself, and an adapter whose broker
owns queues consumes the queue directly instead of binding a tap - the form a dead-letter queue is
read with.
public static class ProtoDestination
- Inheritance
-
ProtoDestination
- Inherited Members
Remarks
A queue destination is consumed, never declared: the queue exists through whoever owns it, the application's topology or the dead-letter bindings that feed it. Awaiting one reads the queue itself, so a queue with a live consumer, or two tests awaiting one queue, share its deliveries; prefer the exchange that feeds it when the suite runs in parallel. An adapter whose broker has no queue model refuses a queue destination with QueueUnsupported(string, string, string) instead of dropping it, so the await names the transport and the fix.
Fields
QueueScheme
The prefix that marks a destination as a queue: queue:.
public const string QueueScheme = "queue:"
Field Value
Methods
IsQueue(string?)
Whether destination addresses a queue.
public static bool IsQueue(string? destination)
Parameters
destinationstring
Returns
Queue(string)
The destination that names the queue name.
public static string Queue(string name)
Parameters
namestring
Returns
Exceptions
- ArgumentException
nameis null, empty or whitespace.
QueueName(string)
The queue name a queue destination carries. A destination without the queue form, or one whose name is empty, fails naming the form instead of being read as an exchange.
public static string QueueName(string destination)
Parameters
destinationstring
Returns
Exceptions
- ArgumentException
destinationis not a queue destination.
QueueUnsupported(string, string, string)
The error an adapter whose broker has no queue model throws for a queue destination: it names the destination, the adapter and the remedy, so the await fails with the caller's next step instead of timing out or silently dropping the destination.
public static InvalidOperationException QueueUnsupported(string destination, string brokerName, string remedy)