Change administrative topic attributes

We can change topic attributes in two ways, using either the ALTER TOPIC command or the DEFINE TOPIC command with the REPLACE attribute.

If, for example, we want to change the default priority of messages delivered to a topic called ORANGE.TOPIC, to be 5, use either of the following commands.

  • Use the ALTER command:
    ALTER TOPIC(ORANGE.TOPIC) DEFPRTY(5)
    
    This command changes a single attribute, that of the default priority of message delivered to this topic to 5; all other attributes remain the same.
  • Use the DEFINE command:
    DEFINE TOPIC(ORANGE.TOPIC) DEFPRTY(5) REPLACE
    
    This command changes the default priority of messages delivered to this topic. All the other attributes are given their default values.

If you alter the priority of messages sent to this topic, existing messages are not affected. Any new message, however, use the specified priority if not provided by the publishing application.

Parent topic: Work with administrative topics


Related information