3 Replies Latest reply on Jun 16, 2011 12:21 AM by clebert.suconic

    Last Value Topic

    ljf31415

      Does HornetQ have the ability to do last value topics?  I currently see last value queues in the documentation.  I am looking to use it for market data where the last value of the topic is sent to the consumer upon subscription, like the ActiveMQ feature LastImageSubscriptionRecoveryPolicy.

        • 1. Re: Last Value Topic
          clebert.suconic

          Everything in internally in HornetQ is a queue bound to some address. JMS Topic Subscriptions are just core-queues as anything else.

           

          Having said that, if you want to apply the last-value sematics to your entire JMS Topic, all you have to do is:

           

           

           

          
          <address-settings>
              <address-setting match="jms.topic.MyLastValueTopicName">
              
                ...
                  <last-value-queue>true</last-value-queue>        
                  ...
               </address-setting>
               
               ...
          </address-settings>
          
          
          
          

           

           

          However I'm not really sure if it makes sense, since the Last-value-queue will always receive the last-value anyway.

          • 2. Re: Last Value Topic
            ljf31415

            In the case of market data would a wild card setting work, something like <address-setting match="jms.topic.quotes.*"> so you would not have to list thousands of topics.

             

            Thanks for the clarification.  Great product

            • 3. Re: Last Value Topic
              clebert.suconic

              Was that a question?

               

               

              Yes if you were asking.

               

              if you were just confirming.. yes anyway.