title: How to set message expiry in WebSphere MQ (queue) by Java code ( not by JMS API - time to Live )
body: <p>Can sombody share WebSphere Code for setting up expiration of message in Queue.</p>
  
  <p>I know that ther is a JMSAPI to do set the expiration of message.\</p>
  
  <p>But this JMS-API is not applicable to WebSphere MQ API of Java Code.</p>
  
  <p>I am using the following Code  to produce the messages.</p>
  
  <p>MQMessage.write  &amp; MQMessage.writeUTF   </p>
  
  <p>regards
  karthik</p>