The action defined in the admin message will only be performed when the message reaches the admin queue on the target queue manager. The target queue manager will need to have an admin queue.
To get the message to a remote target queue manager, you will need to have all the appropriate connectivity in place.
If the administration is to be done on the local queue manager, no connectivity is required. Message delivery is achieved by a simple put message call. Simply use the MQeQueueManager API call putMessage(), specifying the destination queue manager and the standard admin queue name.
We can ignore the attribute, and confirmed parameters in our example, though they are available for more controlled access to the admin queue.
//put the message to the right admin queue LocalQueueManager.putMessage(targetQueueManagerName, MQe.Admin_Queue_Name, msg,null,0L);