long confirmId = MQe.uniqueValue(); try { qmgr.putMessage( "RemoteQMgr", "RemoteQueue", msg, null, confirmId ); } catch( Exception e ) { /* handle any exceptions*/ } try { qmgr.confirmPutMessage( "RemoteQMgr", "RemoteQueue", msg.getMsgUIDFields() ); } catch ( Exception e ) { /* handle any exceptions */ }