0 Replies Latest reply on Feb 20, 2013 12:05 PM by 986609

    Browsing a Topic to get all messages with Unregistered Client ID (Sun MQ)

      There is a challenging Situation before me

      Server: SUN MQ

      Topic: ABC have 120 Messages

      I got credentials of brokers and i am making client to it

      I have made a Subscriber with Demo Client ID and Demo Subscription Name.

      I am able to subscribe to Topic

      I am unable to get 120 Messages already present in Topic

      I am able to get new messages which i send to that Topic

      As queuebrowser is available there is no Topic Browser in IMQ Jars.

      I have no access to server so i could not set Client ID or Subscription name so demo is going on

      I need 120 Messages which are already present....How can I?



      session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);

      com.sun.messaging.Topic objTopic = new com.sun.messaging.Topic(destinationName);

      MessageConsumer obj1 =  session.createDurableSubscriber(objTopic,"Endra");

      JMSListener obj2 = new JMSListener();




      JMS Listener Class

      public class JMSListener implements MessageListener,ExceptionListener
      public void onMessage(Message msg)
      catch (JMSException ex)
      Logger.getLogger(JMSConnection.class.getName()).log(Level.SEVERE, null, ex);
      System.out.println("Here it is");

      +public void onException(JMSException jmse) {+

      Started here after directed by Kelly -> https://forums.oracle.com/forums/profile.jspa?userID=795993