[jira] [Updated] (ARTEMIS-1011) Slow consumer detection - producer msg/s rate for queue should take into account messages which are already in queue

2017-08-31 Thread clebert suconic (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARTEMIS-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic updated ARTEMIS-1011:
-
Fix Version/s: (was: 2.3.0)
   2.4.0

> Slow consumer detection - producer msg/s rate for queue should take into 
> account messages which are already in queue
> 
>
> Key: ARTEMIS-1011
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1011
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 1.5.3
>Reporter: Miroslav Novak
>Assignee: Justin Bertram
> Fix For: 1.5.6, 2.4.0
>
>
> There is still a problem how producer msg/s rate is calculated in 
> {{QueueImpl.getRate()}} for slow consumer detection. It calculates only 
> messages added during the last slow consumer check period. As this is used to 
> figure out, in which msg/s rate the queue could serve the consumer then it 
> should also take into account messages which are already in queue at the 
> start of queueRateCheckTime period. 
> Current implementation is problem for cases when messages are sent to queue 
> in bursts, for example producer sends 1000s messages in a few seconds and 
> then stops and will do that again in 1 hour. QueueImpl.getRate() method 
> returns 0 msg/s for slow consumer check period set to for example 5 min and 
> slow consumer detection will be skipped. 
> I tried to fix it by following change to QueueImpl.getRate() method and seems 
> to be ok, wdyt?
> {code}
>private final AtomicLong messageCountSnapshot = new AtomicLong(0);
>public float getRate() {
>   long locaMessageAdded = getMessagesAdded();
>   float timeSlice = ((System.currentTimeMillis() - 
> queueRateCheckTime.getAndSet(System.currentTimeMillis())) / 1000.0f);
>   if (timeSlice == 0) {
>  messagesAddedSnapshot.getAndSet(locaMessageAdded);
>  return 0.0f;
>   }
>   return BigDecimal.valueOf(((locaMessageAdded - 
> messagesAddedSnapshot.getAndSet(locaMessageAdded)) + 
> messageCountSnapshot.getAndSet(getMessageCount())) / timeSlice).setScale(2, 
> BigDecimal.ROUND_UP).floatValue();
>}
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ARTEMIS-1011) Slow consumer detection - producer msg/s rate for queue should take into account messages which are already in queue

2017-07-25 Thread clebert suconic (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARTEMIS-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic updated ARTEMIS-1011:
-
Fix Version/s: (was: 2.2.0)
   2.3.0

> Slow consumer detection - producer msg/s rate for queue should take into 
> account messages which are already in queue
> 
>
> Key: ARTEMIS-1011
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1011
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 1.5.3
>Reporter: Miroslav Novak
>Assignee: Justin Bertram
> Fix For: 1.5.6, 2.3.0
>
>
> There is still a problem how producer msg/s rate is calculated in 
> {{QueueImpl.getRate()}} for slow consumer detection. It calculates only 
> messages added during the last slow consumer check period. As this is used to 
> figure out, in which msg/s rate the queue could serve the consumer then it 
> should also take into account messages which are already in queue at the 
> start of queueRateCheckTime period. 
> Current implementation is problem for cases when messages are sent to queue 
> in bursts, for example producer sends 1000s messages in a few seconds and 
> then stops and will do that again in 1 hour. QueueImpl.getRate() method 
> returns 0 msg/s for slow consumer check period set to for example 5 min and 
> slow consumer detection will be skipped. 
> I tried to fix it by following change to QueueImpl.getRate() method and seems 
> to be ok, wdyt?
> {code}
>private final AtomicLong messageCountSnapshot = new AtomicLong(0);
>public float getRate() {
>   long locaMessageAdded = getMessagesAdded();
>   float timeSlice = ((System.currentTimeMillis() - 
> queueRateCheckTime.getAndSet(System.currentTimeMillis())) / 1000.0f);
>   if (timeSlice == 0) {
>  messagesAddedSnapshot.getAndSet(locaMessageAdded);
>  return 0.0f;
>   }
>   return BigDecimal.valueOf(((locaMessageAdded - 
> messagesAddedSnapshot.getAndSet(locaMessageAdded)) + 
> messageCountSnapshot.getAndSet(getMessageCount())) / timeSlice).setScale(2, 
> BigDecimal.ROUND_UP).floatValue();
>}
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ARTEMIS-1011) Slow consumer detection - producer msg/s rate for queue should take into account messages which are already in queue

2017-05-09 Thread clebert suconic (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARTEMIS-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic updated ARTEMIS-1011:
-
Fix Version/s: (was: 1.5.5)
   1.5.6

> Slow consumer detection - producer msg/s rate for queue should take into 
> account messages which are already in queue
> 
>
> Key: ARTEMIS-1011
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1011
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 1.5.3
>Reporter: Miroslav Novak
>Assignee: Justin Bertram
> Fix For: 1.5.6, 2.2.0
>
>
> There is still a problem how producer msg/s rate is calculated in 
> {{QueueImpl.getRate()}} for slow consumer detection. It calculates only 
> messages added during the last slow consumer check period. As this is used to 
> figure out, in which msg/s rate the queue could serve the consumer then it 
> should also take into account messages which are already in queue at the 
> start of queueRateCheckTime period. 
> Current implementation is problem for cases when messages are sent to queue 
> in bursts, for example producer sends 1000s messages in a few seconds and 
> then stops and will do that again in 1 hour. QueueImpl.getRate() method 
> returns 0 msg/s for slow consumer check period set to for example 5 min and 
> slow consumer detection will be skipped. 
> I tried to fix it by following change to QueueImpl.getRate() method and seems 
> to be ok, wdyt?
> {code}
>private final AtomicLong messageCountSnapshot = new AtomicLong(0);
>public float getRate() {
>   long locaMessageAdded = getMessagesAdded();
>   float timeSlice = ((System.currentTimeMillis() - 
> queueRateCheckTime.getAndSet(System.currentTimeMillis())) / 1000.0f);
>   if (timeSlice == 0) {
>  messagesAddedSnapshot.getAndSet(locaMessageAdded);
>  return 0.0f;
>   }
>   return BigDecimal.valueOf(((locaMessageAdded - 
> messagesAddedSnapshot.getAndSet(locaMessageAdded)) + 
> messageCountSnapshot.getAndSet(getMessageCount())) / timeSlice).setScale(2, 
> BigDecimal.ROUND_UP).floatValue();
>}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ARTEMIS-1011) Slow consumer detection - producer msg/s rate for queue should take into account messages which are already in queue

2017-05-08 Thread clebert suconic (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARTEMIS-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic updated ARTEMIS-1011:
-
Fix Version/s: (was: 2.1.0)
   2.2.0

> Slow consumer detection - producer msg/s rate for queue should take into 
> account messages which are already in queue
> 
>
> Key: ARTEMIS-1011
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1011
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 1.5.3
>Reporter: Miroslav Novak
>Assignee: Justin Bertram
> Fix For: 1.5.5, 2.2.0
>
>
> There is still a problem how producer msg/s rate is calculated in 
> {{QueueImpl.getRate()}} for slow consumer detection. It calculates only 
> messages added during the last slow consumer check period. As this is used to 
> figure out, in which msg/s rate the queue could serve the consumer then it 
> should also take into account messages which are already in queue at the 
> start of queueRateCheckTime period. 
> Current implementation is problem for cases when messages are sent to queue 
> in bursts, for example producer sends 1000s messages in a few seconds and 
> then stops and will do that again in 1 hour. QueueImpl.getRate() method 
> returns 0 msg/s for slow consumer check period set to for example 5 min and 
> slow consumer detection will be skipped. 
> I tried to fix it by following change to QueueImpl.getRate() method and seems 
> to be ok, wdyt?
> {code}
>private final AtomicLong messageCountSnapshot = new AtomicLong(0);
>public float getRate() {
>   long locaMessageAdded = getMessagesAdded();
>   float timeSlice = ((System.currentTimeMillis() - 
> queueRateCheckTime.getAndSet(System.currentTimeMillis())) / 1000.0f);
>   if (timeSlice == 0) {
>  messagesAddedSnapshot.getAndSet(locaMessageAdded);
>  return 0.0f;
>   }
>   return BigDecimal.valueOf(((locaMessageAdded - 
> messagesAddedSnapshot.getAndSet(locaMessageAdded)) + 
> messageCountSnapshot.getAndSet(getMessageCount())) / timeSlice).setScale(2, 
> BigDecimal.ROUND_UP).floatValue();
>}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ARTEMIS-1011) Slow consumer detection - producer msg/s rate for queue should take into account messages which are already in queue

2017-03-10 Thread clebert suconic (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARTEMIS-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic updated ARTEMIS-1011:
-
Fix Version/s: (was: 2.0.0)
   2.next

> Slow consumer detection - producer msg/s rate for queue should take into 
> account messages which are already in queue
> 
>
> Key: ARTEMIS-1011
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1011
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 1.5.3
>Reporter: Miroslav Novak
>Assignee: Justin Bertram
> Fix For: 1.5.5, 2.next
>
>
> There is still a problem how producer msg/s rate is calculated in 
> {{QueueImpl.getRate()}} for slow consumer detection. It calculates only 
> messages added during the last slow consumer check period. As this is used to 
> figure out, in which msg/s rate the queue could serve the consumer then it 
> should also take into account messages which are already in queue at the 
> start of queueRateCheckTime period. 
> Current implementation is problem for cases when messages are sent to queue 
> in bursts, for example producer sends 1000s messages in a few seconds and 
> then stops and will do that again in 1 hour. QueueImpl.getRate() method 
> returns 0 msg/s for slow consumer check period set to for example 5 min and 
> slow consumer detection will be skipped. 
> I tried to fix it by following change to QueueImpl.getRate() method and seems 
> to be ok, wdyt?
> {code}
>private final AtomicLong messageCountSnapshot = new AtomicLong(0);
>public float getRate() {
>   long locaMessageAdded = getMessagesAdded();
>   float timeSlice = ((System.currentTimeMillis() - 
> queueRateCheckTime.getAndSet(System.currentTimeMillis())) / 1000.0f);
>   if (timeSlice == 0) {
>  messagesAddedSnapshot.getAndSet(locaMessageAdded);
>  return 0.0f;
>   }
>   return BigDecimal.valueOf(((locaMessageAdded - 
> messagesAddedSnapshot.getAndSet(locaMessageAdded)) + 
> messageCountSnapshot.getAndSet(getMessageCount())) / timeSlice).setScale(2, 
> BigDecimal.ROUND_UP).floatValue();
>}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ARTEMIS-1011) Slow consumer detection - producer msg/s rate for queue should take into account messages which are already in queue

2017-03-07 Thread John D. Ament (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARTEMIS-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John D. Ament updated ARTEMIS-1011:
---
Fix Version/s: 1.5.5

> Slow consumer detection - producer msg/s rate for queue should take into 
> account messages which are already in queue
> 
>
> Key: ARTEMIS-1011
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1011
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 1.5.3
>Reporter: Miroslav Novak
> Fix For: 2.0.0, 1.5.5
>
>
> There is still a problem how producer msg/s rate is calculated in 
> {{QueueImpl.getRate()}} for slow consumer detection. It calculates only 
> messages added during the last slow consumer check period. As this is used to 
> figure out, in which msg/s rate the queue could serve the consumer then it 
> should also take into account messages which are already in queue at the 
> start of queueRateCheckTime period. 
> Current implementation is problem for cases when messages are sent to queue 
> in bursts, for example producer sends 1000s messages in a few seconds and 
> then stops and will do that again in 1 hour. QueueImpl.getRate() method 
> returns 0 msg/s for slow consumer check period set to for example 5 min and 
> slow consumer detection will be skipped. 
> I tried to fix it by following change to QueueImpl.getRate() method and seems 
> to be ok, wdyt?
> {code}
>private final AtomicLong messageCountSnapshot = new AtomicLong(0);
>public float getRate() {
>   long locaMessageAdded = getMessagesAdded();
>   float timeSlice = ((System.currentTimeMillis() - 
> queueRateCheckTime.getAndSet(System.currentTimeMillis())) / 1000.0f);
>   if (timeSlice == 0) {
>  messagesAddedSnapshot.getAndSet(locaMessageAdded);
>  return 0.0f;
>   }
>   return BigDecimal.valueOf(((locaMessageAdded - 
> messagesAddedSnapshot.getAndSet(locaMessageAdded)) + 
> messageCountSnapshot.getAndSet(getMessageCount())) / timeSlice).setScale(2, 
> BigDecimal.ROUND_UP).floatValue();
>}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ARTEMIS-1011) Slow consumer detection - producer msg/s rate for queue should take into account messages which are already in queue

2017-03-07 Thread John D. Ament (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARTEMIS-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John D. Ament updated ARTEMIS-1011:
---
Fix Version/s: (was: 1.5.4)

> Slow consumer detection - producer msg/s rate for queue should take into 
> account messages which are already in queue
> 
>
> Key: ARTEMIS-1011
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1011
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 1.5.3
>Reporter: Miroslav Novak
> Fix For: 2.0.0
>
>
> There is still a problem how producer msg/s rate is calculated in 
> {{QueueImpl.getRate()}} for slow consumer detection. It calculates only 
> messages added during the last slow consumer check period. As this is used to 
> figure out, in which msg/s rate the queue could serve the consumer then it 
> should also take into account messages which are already in queue at the 
> start of queueRateCheckTime period. 
> Current implementation is problem for cases when messages are sent to queue 
> in bursts, for example producer sends 1000s messages in a few seconds and 
> then stops and will do that again in 1 hour. QueueImpl.getRate() method 
> returns 0 msg/s for slow consumer check period set to for example 5 min and 
> slow consumer detection will be skipped. 
> I tried to fix it by following change to QueueImpl.getRate() method and seems 
> to be ok, wdyt?
> {code}
>private final AtomicLong messageCountSnapshot = new AtomicLong(0);
>public float getRate() {
>   long locaMessageAdded = getMessagesAdded();
>   float timeSlice = ((System.currentTimeMillis() - 
> queueRateCheckTime.getAndSet(System.currentTimeMillis())) / 1000.0f);
>   if (timeSlice == 0) {
>  messagesAddedSnapshot.getAndSet(locaMessageAdded);
>  return 0.0f;
>   }
>   return BigDecimal.valueOf(((locaMessageAdded - 
> messagesAddedSnapshot.getAndSet(locaMessageAdded)) + 
> messageCountSnapshot.getAndSet(getMessageCount())) / timeSlice).setScale(2, 
> BigDecimal.ROUND_UP).floatValue();
>}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (ARTEMIS-1011) Slow consumer detection - producer msg/s rate for queue should take into account messages which are already in queue

2017-03-02 Thread clebert suconic (JIRA)

 [ 
https://issues.apache.org/jira/browse/ARTEMIS-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic updated ARTEMIS-1011:
-
Affects Version/s: (was: 2.0.0)
Fix Version/s: 1.5.4
   2.0.0

> Slow consumer detection - producer msg/s rate for queue should take into 
> account messages which are already in queue
> 
>
> Key: ARTEMIS-1011
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1011
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Broker
>Affects Versions: 1.5.3
>Reporter: Miroslav Novak
> Fix For: 2.0.0, 1.5.4
>
>
> There is still a problem how producer msg/s rate is calculated in 
> {{QueueImpl.getRate()}} for slow consumer detection. It calculates only 
> messages added during the last slow consumer check period. As this is used to 
> figure out, in which msg/s rate the queue could serve the consumer then it 
> should also take into account messages which are already in queue at the 
> start of queueRateCheckTime period. 
> Current implementation is problem for cases when messages are sent to queue 
> in bursts, for example producer sends 1000s messages in a few seconds and 
> then stops and will do that again in 1 hour. QueueImpl.getRate() method 
> returns 0 msg/s for slow consumer check period set to for example 5 min and 
> slow consumer detection will be skipped. 
> I tried to fix it by following change to QueueImpl.getRate() method and seems 
> to be ok, wdyt?
> {code}
>private final AtomicLong messageCountSnapshot = new AtomicLong(0);
>public float getRate() {
>   long locaMessageAdded = getMessagesAdded();
>   float timeSlice = ((System.currentTimeMillis() - 
> queueRateCheckTime.getAndSet(System.currentTimeMillis())) / 1000.0f);
>   if (timeSlice == 0) {
>  messagesAddedSnapshot.getAndSet(locaMessageAdded);
>  return 0.0f;
>   }
>   return BigDecimal.valueOf(((locaMessageAdded - 
> messagesAddedSnapshot.getAndSet(locaMessageAdded)) + 
> messageCountSnapshot.getAndSet(getMessageCount())) / timeSlice).setScale(2, 
> BigDecimal.ROUND_UP).floatValue();
>}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)