public class PublicationAddress

Summary

Container for an exchange name, exchange type and routing key, usable as the target address of a message to be published.

Remarks

The syntax used for the external representation of instances of this class is compatible with QPid's "Reply-To" field pseudo-URI format. The pseudo-URI format is (exchange-type)://(exchange-name)/(routing-key), where exchange-type is one of the permitted exchange type names (see class ExchangeType), exchange-name must be present but may be empty, and routing-key must be present but may be empty.

The syntax is as it is solely for compatibility with QPid's existing usage of the ReplyTo field; the AMQP specifications 0-8 and 0-9 do not define the format of the field, and do not define any format for the triple (exchange name, exchange type, routing key) that could be used instead. Please see also the way class RabbitMQ.Client.MessagePatterns.SimpleRpcServer uses the ReplyTo field.

Field Summary

Flags Type Name Summary
public initonly static Regex PSEUDO_URI_PARSER

Regular expression used to extract the exchange-type, exchange-name and routing-key from a string.

Property Summary

Flags Type Name Summary
public string ExchangeName (r)

Retrieve the exchange name.

public string ExchangeType (r)

Retrieve the exchange type string.

public string RoutingKey (r)

Retrieve the routing key.

Constructor Summary

Flags Name Summary
public PublicationAddress(string exchangeType, string exchangeName, string routingKey)

Construct a PublicationAddress with the given exchange type, exchange name and routing key.

Method Summary

Flags Name Summary
public static PublicationAddress Parse(string uriLikeString)

Parse a PublicationAddress out of the given string, using the PSEUDO_URI_PARSER regex.

public virtual string ToString()

Reconstruct the "uri" from its constituents.

Field Detail

public initonly static Regex PSEUDO_URI_PARSER

Summary

Regular expression used to extract the exchange-type, exchange-name and routing-key from a string.

Property Detail

public string ExchangeName (r)

Summary

Retrieve the exchange name.

public string ExchangeType (r)

Summary

Retrieve the exchange type string.

public string RoutingKey (r)

Summary

Retrieve the routing key.

Constructor Detail

PublicationAddress

public PublicationAddress(string exchangeType, string exchangeName, string routingKey)

Parameters
Name Type
exchangeType string
exchangeName string
routingKey string

Summary

Construct a PublicationAddress with the given exchange type, exchange name and routing key.

Method Detail

Parse

public static PublicationAddress Parse(string uriLikeString)

Flags public static
Return type PublicationAddress
Parameters
Name Type
uriLikeString string

Summary

Parse a PublicationAddress out of the given string, using the PSEUDO_URI_PARSER regex.

ToString

public virtual string ToString()

Flags public virtual
Return type string

Summary

Reconstruct the "uri" from its constituents.