Remove alias

Note that removing an alias could potentially alter the routing of messages. Therefore, this operation should be treated with care.

Administration message

Figure 25. Removing an alias in Java

/* Create an empty queue admin message and parameters field */
MQeQueueAdminMsg msg = new MQeQueueAdminMsg();
 
/* Prime message with who to reply to and a unique identifier 
/* and set the name of the QueueManager and Queue  */
 
/* Specify the alias of the queue to be removed */
msg.removeAlias( "Fred" );
 
/* Set the admin action to update the queue */
msg.update( parms );

C API

Figure 26. Removing an alias in C

       rc = mqeAdministrator_LocalQueue_removeAlias(hAdministrator,
                                                 &exceptBlk,
                                                 hLocalQueueName,
                                                 hLocalQMName,
                                                 hAliasName);
       if (   EC(&exceptBlk) == MQERETURN_NOTHING_TO_DO  
           && ERC(&exceptBlk) == 
													MQEREASON_NO_SUCH_QUEUE_ALIAS ) {
           /* alias doesn't exist */
       }


© IBM Corporation 2002. All Rights Reserved