MQ
11.0 10.3 10.2
11.0 10.3 10.2

23.12 Topics

This section explains the creation of Topic objects:

  1. Creating the Admin Service

MQ Admin Service creates topics on the FioranoMQ server. The instance of admin service can be obtained from the admin connection.

acf = (MQAdminConnectionFactory) ic.lookup ("primaryACF");
ac = acf.createMQAdminConnection ("admin", "passwd");
adminService = ac.getMQAdminService();

2. Topic Metadata

Create a Topic metadata, specifying the name, description and the storage type. The storage type of the destination can be RDBMS_BASED_DATABASE or FILE_BASED_DATABASE

TopicMetaData metadata = new TopicMetaData ();
metadata.setName ("mytopic");
// For RDBMS based storage type
metadata.setStorageType(IFioranoConstants.RDBMS_BASED_DATABASE);

or

// For file based storage type
metadata.setStorageType(IFioranoConstants.FILE_BASED_DATABASE);

3. Create the Topic

Create the Topic object using the adminService and the topic metadata.

adminService.createTopic(metadata);