mental ray for Maya expects only certain connections to be made to the message attribute in the Attribute Editor. See mental ray Shader connections for more details.