...
Code Block |
---|
public void testHierarchicalTopics () { // create the initial context and connect to FioranoMQ 9 Hashtable env = new Hashtable (); env.put (Context.SECURITY_PRINCIPAL, "anonymous"); env.put (Context.SECURITY_CREDENTIALS, "anonymous"); env.put (Context.PROVIDER_URL, "http://localhost:1856"); env.put Context.INITIAL_CONTEXT_FACTORY,"fiorano.jms.runtime.naming.FioranoInitialContextFactory"); InitialContext ic = new InitialContext (env); System.out.println ("Created InitialContext:: " + ic); MQAdminConnectionFactory acf = (MQAdminConnectionFactory) ic.lookup ("primaryACF"); MQAdminConnection ac = acf.createMQAdminConnection ("admin", "passwd"); System.out.println ("Created Admin Connection..."); MQAdminService adminService = ac.getMQAdminService (); System.out.println ("Received handle to Admin services:: " + adminService); // Create a topic named primaryTopic.subTopic1 String topicName = "primarytopic.subtopic1"; TopicMetaData tMetaData = new TopicMetaData(); tMetaData.setName (topicName); adminService.createTopic (tMetaData); Topic topic = (Topic) ic.lookup (topicName); System.out.println ("Looked up the Hierarchical Topic ", topic.getName()); //create a topic named primarytopic.subtopic2 String topicName = "primarytopic.subtopic2"; TopicMetaData tMetaData = new TopicMetaData (); tMetaData.setName (topicName); adminService.createTopic (tMetaData); topic = (Topic) ic.lookup (topicName); System.out.println ("Looked up the Hierarchical Topic ", topic.getName()); } |
15.1.2
...
eStudio
The User can create Hierarchical Topics with admin Studio. To create hierarchical topics with studioeStudio, follow the steps below:
- Launch Fiorano StudioeStudio and connect Studio eStudio to the FioranoMQ Server.
- To create a topic, navigate to the Topics sub-node under the Destinations node of the tree
- Right-click the Topics node and select Add Topic
...
Overview
Content Tools
ThemeBuilder