2 Replies Latest reply on Oct 19, 2015 10:35 AM by pmm

    JMS timestamps wrong with WebSphere MQ

    pmm

      When sending JMS messages the JMS timestamps we see on the client are all in January of 1970.

      Our code roughly looks like this:

       

      try (JMSContext context = this.connectionFactory.createContext()) {
        JMSProducer producer = context.createProducer();
        TextMessage message = context.createTextMessage(this.createMessageString());
        producer.send(this.queue, message);
      }
      

       

      We do not explicitly call Message#setJMSTimestamp. It is our understanding that we should not call this method.

       

      We are using WildFly 9.0.1 and the IBM WebSphere MQ 8.0.0.3 RAR.

        • 1. Re: JMS timestamps wrong with WebSphere MQ
          jbertram

          So at what point are you checking the timestamp of the message?  I don't see that bit of code in what you pasted.

          • 2. Re: JMS timestamps wrong with WebSphere MQ
            pmm

            Justin Bertram wrote:

             

            So at what point are you checking the timestamp of the message?  I don't see that bit of code in what you pasted.

            That is in a (different) Java SE application. That is just

            new Date(message.getJMSTimestamp());
            

            the message is retrieved from a QueueBrowser.

             

            We have very similar code that sends JMS messages using Java SE. For these messages the timestamp the client above displays is correct.