7 Replies Latest reply on Feb 18, 2009 1:28 AM by timfox

    message compression

      Hello,

      If I were to use standalone jms, is it possible to config jboss messaging to compress/decompress message data transparently via server level? If yes, would you be so kind to give out some links on documentation and api for how to use it?

      Much Thanks.

        • 1. Re: message compression
          gaohoward

          Are you trying JBM 2.0 or 1.4? I know jbm 1.4 has no direct compress/decompress utilities.

          • 2. Re: message compression

            Hi gaohoward,

            Thanks for trying, but I don't see how JBM has anything to do with my question.

            I am using JBOSS messaging as a JMS vendor. I setup Queues and then I have client app connect to it to deliver and consume messages. My question is is there way to configure JBOSS so that these message will be compressed/decompress transparently through my client app during transport?

            I assume it can be done by the JMS broker level. For example ActiveMQ broker does this, and they configure their setting trough their class method something like ActiveMQConnectionFactory#setUseCompression. I checked JBOSS API, and there no such method. How may I do the same on JBOSS Messaging?

            Thanks.

            • 3. Re: message compression
              timfox

               

              "mrjavadude" wrote:
              Hi gaohoward,

              Thanks for trying, but I don't see how JBM has anything to do with my question..


              It has a lot to do with your question. JBM = JBoss Messaging and this is the JBoss Messaging Forum.

              If you're question is not about JBoss Messaging then you're posting it in the wrong place.

              • 4. Re: message compression

                timfox and gaohoward,

                My bad. I thought it was refering to "http://www.jboss.org/jbossjbpm/".

                My quesiton is about JBoss Messaging. JBM it is then. sorry for not familiar with the abbr.

                In this case, yes, I am trying out JBM 2.0 (http://www.jboss.org/jbossmessaging/). I hope my question on the second post is more clear.

                Sincerely

                • 5. Re: message compression
                  timfox

                   

                  "mrjavadude" wrote:

                  In this case, yes, I am trying out JBM 2.0 (http://www.jboss.org/jbossmessaging/).


                  That link is to the JBM project page, not specifically to JBM 2.0.

                  But to cut a long thread short, we don't currently support compression in either JBM 1.x or JBM 2.0.

                  If you like you can add a feature request in JIRA against 2.0 and we can add it. It should be pretty easy to do.

                  • 6. Re: message compression

                    timfox,

                    Thanks for the correction and confirmation. I have filed a request at
                    https://jira.jboss.org/jira/browse/JBMESSAGING-1512

                    Hope to see it soon in the future release!


                    BTW, if I were to digmy hands dirty in trying to implement this on my own first, what classes in source files would you recommend me to start looking at? Is there currently a interceptor hook like API available that I can add this feature?

                    Thanks.

                    • 7. Re: message compression
                      timfox

                      javadude-

                      If you'd like to have a go at implementing this, the classes to look at are:

                      ClientSessionFactoryImpl:: you'd need to add at least one new param

                      int maxUnCompressedSize - any messages above this size get automatically compressed.

                      then in

                      ClientProducerImpl, before sending the message, you'd need to take the message body and zip it before sending.

                      in ClientConsumerImpl you'd do the uncompressing.

                      Best to take this discussion to the design forum, since it's no longer a user issue... :)