1 Reply Latest reply on Aug 5, 2009 6:53 AM by ataylor

    ack problem casued by consumer window size

    ataylor

      This is to do with https://jira.jboss.org/jira/browse/JBMESSAGING-1693.

      If i set the producer window size to 100 and the ack batch size to -1 the consumer will hang after a couple of messages. In this scenario the send semaphore has 100 and the confirm window size will be 75 (i.e. 100 *.75).

      I logged the acquiring of send semaphores and you can see how it hangs as follows

      client permits used server receive bytes
      client aquires 53 available 100 53 0
      server receives packet size 53 53 53
      client aquires 25 available 47 78 53
      client aquires 13 available 22 91 53
      server receives packet size 25 91 78
      server frees 78 bytes 13 0
      server receives packetsize 13 13 13
      client aquires 30 available 87 43 13
      client aquires 30 available 57 73 13
      client aquires 30 available 27 (waits) 73 13
      server receives packet size 13 73 43
      server receives packet size 13 73 73
      hang


      If i change the confirm window size to 70 % (i.e. 100 * .7) then it works fine.

      Thing is i'm struggling with the maths here of what the confirm window size should be in order to always work. any ideas anyone.

      We could make this configurable?

        • 1. Re: ack problem casued by consumer window size
          ataylor

          actually it should be

           client permits used server receive bytes
          client aquires 53 available 100 53 0
          server receives packet size 53 53 53
          client aquires 25 available 47 78 53
          client aquires 13 available 22 91 53
          server receives packet size 25 91 78
          server frees 78 bytes 13 0
          server receives packetsize 13 13 13
          client aquires 30 available 87 43 13
          client aquires 30 available 57 73 13
          client aquires 30 available 27 (waits) 73 13
          server receives packet size 30 73 43
          server receives packet size 30 73 73
          hang