5 Replies Latest reply on Oct 30, 2010 1:13 AM by rahul_gsg

    Multiple Issues with Interceptor.

    rahul_gsg Newbie

      SessionCreateConsumerMessage and SessionConsumerCloseMessage always return 0 for getID() and getConsumerID() respectivily during topic subscription and unsubsription.

       

      Test Environment  : CentOS release 5.2 , jboss-4.2.3.GA , jre1.6.0_16-b01

       

       

      Also SessionConsumerCloseMessage doesn't expose getQueueName()  , so if there are multiple topics hosted on the server , there is no way to distiguish two SessionConsumerCloseMessages.

        • 1. Re: Multiple Issues with Interceptor.
          Clebert Suconic Master

          The ConsumerID should be based on a counter started at the client. Starting at 0. Maybe it's 0 because you only have a single consumer.

          • 2. Re: Multiple Issues with Interceptor.
            rahul_gsg Newbie

            Hi Clebert,

             

            When I started multiple subscribers using REST for a single topic, I saw the same IDs getting printed through the interceptors for all the subscriptions in SessionCreateConsumerMessage, However the chennelId was getting incremented always. [So this means if the remote address is same , the consumerId will kept same always?]

             

            Problem I am facing is ,  if I have two topics with one subsriber for each and when the subscribers call unsubscribe or if they idle time out , I will get SessionConsumerCloseMessage event from both  . In this case consumerid and channelid will be 0 for both unsubscriptions .

            How would I differentiate for which topic these unscriptions belong to in the interceptor as SessionConsumerCloseMessage doesn't have any info about queue/topic they belonged to?

            • 3. Re: Multiple Issues with Interceptor.
              rahul_gsg Newbie

              thought of using SessionDeleteQueueMessage , But this event is not generated if the subscriber times out.

              • 4. Re: Multiple Issues with Interceptor.
                Clebert Suconic Master

                The Consumer is unique with ChannelD + consumerID

                 

                A channel can have multiple consumers, each consumer will start with 0 on a given ChannelID.

                • 5. Re: Multiple Issues with Interceptor.
                  rahul_gsg Newbie

                  Hi Clebert ,

                   

                  With REST pull subscriptions for a Topic, I see the CosumerID always shown as 0 in the interceptors. However as you said the combination of ChannelD + consumerID is always unique {ChannelD is always unique} . Once a particular subscription is closed , I see the HornetQ making use of the same channelID again for new subscriptions.

                   

                  I have checked this with multiple subscriptions from different IPAddress each.

                   

                  With this can I safely assume that at a given point of time , I can uniquely identify an un-subscription based on only  ChannelD + consumerID across the topics/queues in the system?