4 Replies Latest reply on Aug 27, 2007 5:55 AM by hendra_netm

    Remove Message w/ Selector & list unique prop value

    hendra_netm

      Hi guys,
      Currently, I am trying to implement "Remove messages with selector" and "List unique property value" in my local copy of JBoss Messaging. I hope that these features can be also put in official JBoss Release. ;)
      Below is the explanation of the features.

      "Remove Messages With Selector" is usable for operator that want to remove "certain" type of messages in destination.
      For example, remove messages with customer id's value 1000. This is happened becaused sometime a value become obsolete, and all messages related to it have to be removed from destination.

      List Unique Property Value is useful for listing unique value of a property. Sometime operator wants to know what kind of values available in destination, and acts based on the value received.

      For example, when we have three messages, each has property customer Id with value 1000, 2000, 1000 respectively. When users call list unique property customer Id, they will received a list contains values 1000, and 2000. Based on this, users know how many customer use the service.

      What's your opinion these features? If you are agree then I will create JIRA tasks and work on them.

      Thank you for your time reading this.

      Best Regards,
      Hendra

        • 1. Re: Remove Message w/ Selector & list unique prop value
          genman

          "Remove Messages With Selector" seems like it would be easily implemented by simply creating a message listener with a selector and consuming all messages. Perhaps having a JMX operation that encapsulated this would make sense, is this what you were considering?

          Some sort of "Move" would be nice to see.

          As for "List Unique Property Value" this could be also done using a message browser and a few lines of code. This doesn't seem generally useful.

          What I've found over the years that in normal processing environments your queues should be empty or nearly so. Otherwise, if you're running a business process, you're losing money or your customers are "stuck in line."

          • 2. Re: Remove Message w/ Selector & list unique prop value
            hendra_netm

            Hi genman,
            The system that I would like to create using jboss messaging is kind of messages router.

            So every messages should be delivered to specific user. In some occasions, I consider that users can decide to delete their account. In this case, operator needs to remove those messages somehow.

            Expiration Queue may become alternative solution. However, this may cause confusion between messages that should be keep in expired queue and messages that should be deleted.

            List Unique Property Value is useful also for that scenario. Operator needs a way to get available values in the queue to know whether there is any obsolete messages in the queue or not.

            List all Messages can be used but I think it can become a burden for the network if lots of messages were in queue.


            ====================================
            For the implementation, I use something like remove all messages, but with filter. So every messages will be checked. If it matchs with the filter, it is going to be removed from the queue.
            Your idea seems simpler than mine. I will look into it.

            List Unique Property Value is implemented by using the same algorithm as ListAllMessages, but the method will only return the unique and requested values.
            This method may be used only for my case. So may be this method should be developed to give more functions, or may be there is another solution to get the value.

            Thank you for your comment.

            Best Regards,
            Hendra

            • 3. Re: Remove Message w/ Selector & list unique prop value
              hendra_netm

              List unique Property value is also used by my colleague for his case.
              He has about 1000 users but is only allowed to create about 10 thread of messages consumer to serve them due to resource available.

              When a user logs in, the system should check whether there is a message for them or not. if there is, than the messages will be consumed and forwarded to the user.

              When the number of user is more than the number of thread available, users will be served one after another using a scheduler algorithm (round robin, FIFO, etc).

              His plan was using message consumer with message selector, but he needed to change the selector often. With list unique property, he can see directly which user has messages and change messages selector efficiently.

              Best Regards,
              Hendra

              • 4. Re: Remove Message w/ Selector & list unique prop value
                hendra_netm

                Sorry for triple posting
                @genman,
                I just checked the source, I think by simply creating message listener for "removing message with selector" can cause problem for scheduled delivery messages, or?

                May be I don't catch your idea. If I am wrong, could you explain again your idea to me.

                Thank you in advance.

                Best Regards,
                Hendra