2 Replies Latest reply on Jun 12, 2007 3:24 PM by SUNDARRAJAN SUYAMBOO

    trouble with durable JMS subscribers

    ravi veerla Newbie

      Hi all,

      I am trying to implement a three tier application. In which one application writes messages to a Queue, a second application reads from the Queue, and writes the result message to a Topic. a third application reads from the Topic.

      I succeded in building the first two applications, and im having trouble reading messages from the Topic.

      There are two problems.

      1) I am creating durable subscriber, with the name TestSubscriber, and every time i run the program. it is adding a new Subscriber to the Topic with the same name. My understanding was that whenever we call the createDurableSubscriber method, with the same Topic name, and subscriber name it would reactivate the same subscriber. but in the Jboss admin console, i can see a new subscriber being added to the topic every time i run the program. each subscriber has a different clientId. is this the way it works, or did i understand any thing wrong.

      2)the recieve method never reads a message from the topic. Every time i added a message it increases the message count to all the subscribers, but the recieve method never reads them. if I use the non blocking recieveNoWait, it returns a null, if I use the blocking recieve it just hangs in there as it is not reading any message. what could be the problem.

      Any guidance will be greatly appreciated.


        • 1. Re: trouble with durable JMS subscribers
          ravi veerla Newbie

          Hi all,

          I have figured the root of the problem for both the issues. in case if this helps some newbie with the same kind of trouble im posting the solution here.

          First thing is every time I ran the client, Jboss is treating the durable subscriber as from a new client, so in reality we need to create one durable subscriber, and this subscriber can be re-used any number of times(creating it and closing it) in the same run. and this solved the other problem too.

          • 2. Re: trouble with durable JMS subscribers

            I am working on jboss publisher - durable subscribers . I made the necessary configuration . Able to publish messages succesfully to topic but the subscriber fails to read the messages. Could you please provide more information on this?

            If I use the same client id more than once , I am being thrown with Client Id already exists.