If the queue manager has an alias mapping destinationQueueManagerName to another name, for example realQueueManagerName, then this substitution is made first, and the call:
putMessage(destinationQueueManagerName, destinationQueueName
is effectively transformed to
putMessage(realQueueManagerName, destinationQueueName.
From this point on destinationQueueManagerName is completely forgotten, and realQueueManagerName is used.