Destinations in .NET
In .NET, destinations are created according to protocol type and can be used only on the protocol type for which they are created.
Two functions are provided for creating destinations, one for topics and one for queues:
- IDestination CreateTopic(String topic);
- IDestination CreateQueue(String queue);
These functions are available on the following two objects in the API:
- ISession
- XMSFactoryFactory
In both cases these methods can accept a URI style string, which can include parameters, in the following format:
"topic://some/topic/name?priority=5"
Alternatively, these methods can accept a destination name only, that is, a name without a topic:// or queue:// prefix and without parameters.
This means that the following URI style string:CreateTopic("topic://some/topic/name");would produce the same result as the following destination name:
CreateTopic("some/topic/name");
As for WebSphere Application Server service integration bus JMS, topics can also be specified in a shorthand form, which includes both the topicname and topicspace but cannot include parameters:
CreateTopic("topicspace:topicname");Parent topic: Writing XMS .NET applications