8 Replies Latest reply on Mar 27, 2009 6:53 PM by clebert.suconic

    WindowSize=1 behaviour?

    clebert.suconic

      Setting WindowSize=0 is current invalid.
      Setting WindowSize=1 (currently the option for slow consumers I found on cdoe), will of course keep at least one message on the buffer.


      I have added a testSlowconsumer validating it with WindowSize=1 as it doesn't work with WindowSize=0 ATM (It would need some dev around that).

      I thought there was a JIRA somewhere for that but i couldn't find it now.

        • 1. Re: WindowSize=1 behaviour?
          timfox

          I didn't understand your test - it looks weird. Also you're calling commit on a non transacted session...

          Actually I didn't understand Andy's window size test either.. What's it trying to demonstrate?

          I'll add another test.

          • 2. Re: WindowSize=1 behaviour?
            timfox

            I added a new test in there that demonstrates what slow consumers behaviour should be.

            Also we'll need some other window size tests

            • 3. Re: WindowSize=1 behaviour?
              timfox

              btw window size = 0 should mean slow consumers (not 1)

              • 4. Re: WindowSize=1 behaviour?
                ataylor

                 

                Actually I didn't understand Andy's window size test either.. What's it trying to demonstrate?


                which of my tests are you referring too.

                • 5. Re: WindowSize=1 behaviour?
                  timfox

                   

                  "ataylor" wrote:

                  which of my tests are you referring too.


                  There's only one ;)

                  • 6. Re: WindowSize=1 behaviour?
                    ataylor

                    it tests that the consumer window size is respected.

                    I calculate the message size, lets say its 1k.

                    if i have 2 consumers and have sent 400 1k messages and consume 200 messages from consumer 1 then i know that consumer 2 will have 100 messages in its buffer. i.e. the queue delivering count should be 100.

                    • 7. Re: WindowSize=1 behaviour?
                      clebert.suconic

                       

                      "timfox" wrote:
                      I didn't understand your test - it looks weird. Also you're calling commit on a non transacted session...



                      I was calling the commit, just to make sure any pending ACK would be flushed to the server, so this assertion would be valid:


                       assertEquals(0, getMessageCount(service, ADDRESS.toString()));
                      



                      But I just removed it now.


                      The test is creating two consumers consumers (consNeverUsed and cons1) before any messages are sent.

                      consNeverUsed should never buffer any messages, and it is actually buffering it.

                      I've tried using windowSize = 0, but createSession was complaining about it.

                      • 8. Re: WindowSize=1 behaviour?
                        clebert.suconic

                        From now on:

                        WindowSize = 1 => Buffer 1 message on the client
                        WindowSize = 0 => No Buffering


                        I have added a few tests for both largeMessages and regularMessages.