Change local subscription attributes

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

If, for example, you want to change the priority of messages delivered to a subscription called ORANGE to be 5, use either of the following commands:

  • Use the ALTER command:
    ALTER SUB(ORANGE) PUBPRTY(5)
    

    This command changes a single attribute, that of the priority of messages delivered to this subscription to 5; all other attributes remain the same.

  • Use the DEFINE command:
    DEFINE SUB(ORANGE) PUBPRTY(5) REPLACE
    

    This command changes not only the priority of messages delivered to this subscription, but all the other attributes which are given their default values.

If you alter the priority of messages sent to this subscription, existing messages are not affected. Any new messages, however, are of the specified priority.