4 Replies Latest reply on Jun 4, 2003 8:08 AM by bhagyesht

    Durable Topic

      Hi,
      Could you help me in creating a DURABLE topic . I have seen the discriptor for MDB, we say <subscription type > Durable</subscription type>.
      But I am not using MDB . Is there something in any property file to tell that the topic is durable .

      Thanks in advance.

        • 1. Re: Durable Topic

          Set up your durable subscriber in conf/default/jbossmq-state.xml, eg:


          john
          needle
          DurableSubscriberExample

          DurableSubscriberExample
          testDurableTopic



          Create a durable TopicSubscriber:

          TopicConnection con=factory.createTopicConnection("john","needle");

          con.createDurableSubscriber(yourTopic,"DurableSubscriberExample");

          This should work.

          //Peter

          • 2. Re: Durable Topic

            Thanks Peter ,
            I think by writing in jbossmq-state.xml

            system
            pass
            passsystem

            passsystem
            hiveTopic


            this will make the user to be durable but what about the topic , we havent mentioned any where that the topic is durable.
            May be I am messing up with durable TOPIC and durable SUBSCRIBER, are these same thing or diff ??

            • 3. Re: Durable Topic

              I don't get it:
              "hiveTopic", thats the name of the durable topic.

              Look it up in jndi, log in, specify your id, and you got yourself a durable subscriptions. When everything works this means that all messages sent to the topic will allways be sent to a subsriber with the correct id, if no such subsriber is online the messages will be retained until such a subscriber gets online.

              //Peter

              • 4. Re: Durable Topic
                bhagyesht

                Thanks Peter.