User:רנדום/Scratchpad
Appearance
try
{
MQQueueManager qmgr = new MQQueueManager( "localhost" );
MQQueue queue = qmgr.AccessQueue( "HELLO.QUEUE",
MQC.MQOO_OUTPUT + // open queue for output
MQC.MQOO_FAIL_IF_QUIESCING // but not if MQ is stopping
);
MQMessage msg = new MQMessage();
msg.WriteString( "Hello World" );
queue.Put( msg );
queue.Close();
qmgr.Disconnect();
}
catch( MQException mqe ) {
// ...
}