1 Reply Latest reply on Jan 26, 2005 12:07 PM by kurt mehlhoff

    Can't receive ObjectMessage in remote client

    kurt mehlhoff Newbie

      I use JBoss out of the box (except one topic and one queue configured).
      I have an application that uses JBoss MQ in a variety of configurations and platforms. I've never had a problem like this before.

      I shutdown my application and am using a modified SimpleQueueSender and SimpleQueueReceiver from the Sun JMS tutorial pages in order to isolate the problem.

      My configuration is two WIN2k servers (server and client).
      JDK 1.4 Sun on both servers.
      Same problem with JBoss versions 3.2.3 and 3.2.6.


      Same JMS client code is running on the server (A) and client (B) machines.

      The problem I originally noticed was with ObjectMessages, but my client creates one text message and one object message and posts both of them.

      The text message is simple "This is message 1" and the object message is a trivial object, the message has one text property which is less than 20 charaters long.

      Client(A) posts messages to a queue.
      Client(B) can read both messages.

      Server client posts messages to a queue.
      Client client can read text message, but not object message.

      No errors are reported on either the client or server. I have turned on tracing on the client and still see no errors.

      The relevant client code looks like:

      Message msg = queueReceiver.receive(1);

      and the msg is showing up null when the message is an ObjectMessage.

      I have the queue session set up for CLIENT_ACKNOWLEDGE, but even though I do not ack the message, the QUEUE_DEPTH is decremented in the jmx console on the server when I run it.

      I have tried using (default) UIL2 invocation layer and also HTTP - with same results.

        • 1. Re: Can't receive ObjectMessage in remote client - RESOLVED
          kurt mehlhoff Newbie

          It turns out that I left out some important information:

          1) My message sender sends the ObjectMessage with priority and TimeToLive set (1 hr). But - the TextMessage has no such parameters set.

          2) I found a line in the trace output for the client:

          [main] TRACE org.jboss.mq.SpyMessageConsumer - preprocess() acking expired message=...

          3) A quick glance shows the two systems to have almost identical times set (less than 1 minute apart) and the dates are the same. Alas, the timezones are 6 hours apart.

          Setting TTL=0 allows the client to read the message.