Following link provides an overview of XMS.NET
http://www-01.ibm.com/support/docview.wss?uid=swg27024064
IBM MQ Redistributable package can be used to develop MQ .NET applications without installing the Client.You will have to use MQ v9.0.5 or above to use XMS.NET client.You can download the latest redistributable package from the following link
9.1.0 IBM MQ C and .NET redistributable client for Windows x64
If you have MQ client install then there are samples located at "MQ_INSTALL_PATH\Tools\dotnet\samples\cs\xms\simple\wmq" and following link provides a brief description about the samples
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.xms.doc/xms_csamp.html
Following is the code sample to get a message asynchronously using Message listeners.
/// <summary>
/// Setup connection to MQ queue manager using XMS .NET
/// </summary>
private void ibmmqSetupConnection()
{
XMSFactoryFactory factoryFactory;
IConnectionFactory cf;
IDestination destination;
IMessageConsumer consumerAsync;
MessageListener messageListener;
// Get an instance of factory.
factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
// Create WMQ Connection Factory.
cf = factoryFactory.CreateConnectionFactory();
// Set the properties
cf.SetStringProperty(XMSC.WMQ_HOST_NAME, "host.ibm.com");
cf.SetIntProperty(XMSC.WMQ_PORT, 1414);
cf.SetStringProperty(XMSC.WMQ_CHANNEL, "QM.SVRCONN");
cf.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT);
cf.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "QM1");
cf.SetStringProperty(XMSC.USERID, "myuserid");
cf.SetStringProperty(XMSC.PASSWORD, "passw0rd");
// Create connection.
connectionWMQ = cf.CreateConnection();
// Create session with client acknowledge so that we can acknowledge
// only if message is sent to Azure Service Bus queue
sessionWMQ = connectionWMQ.CreateSession(false, AcknowledgeMode.ClientAcknowledge);
// Create destination
destination = sessionWMQ.CreateQueue("INPUTQ");
// Create consumer
consumerAsync = sessionWMQ.CreateConsumer(destination);
// Setup a message listener and assign it to consumer
messageListener = new MessageListener(OnMessageCallback);
consumerAsync.MessageListener = messageListener;
// Start the connection to receive messages.
connectionWMQ.Start();
// Wait for messages till a key is pressed by user
Console.ReadKey();
// Cleanup
consumerAsync.Close();
destination.Dispose();
sessionWMQ.Dispose();
connectionWMQ.Close();
}