7 Replies Latest reply on Sep 23, 2003 4:42 PM by Adrian Brock

    JMS Problem

    vincentchun Newbie

      Thanks for all first.

      Why I cannot subscribe a message in the following case?
      1. I publish a message first
      2. Then, I subscribe a message

      but I can subscribe a message in the following case:
      1. I subscribe a message first
      2. Then, I publish a message

      I use Servlet to subscribe the message.

      Is the message will stay in JBoss Server after it is published?

      Part of my code:
      TopicPublisher publisher = session.createPublisher(topic);
      publisher.publish(message, DeliveryMode.NON_PERSISTENT, 4, 0);

      The result is same if I use the following codes:
      publisher.publish(message, DeliveryMode.PERSISTENT, 4, 0);
      or
      publisher.publish(message, DeliveryMode.NON_PERSISTENT, 4, 50000);

      How to set the JBoss that can make a message stay in Server?