[ 
https://issues.apache.org/jira/browse/ARTEMIS-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15458237#comment-15458237
 ] 

clebert suconic edited comment on ARTEMIS-699 at 9/2/16 11:09 AM:
------------------------------------------------------------------

Also: consider the meaning of a group.

A group binds messages to a specific consumer. So, in theory you should have a 
handful of consumers processing your messages. a Group will ensure that an 
entire group would arrive to the specific consumer in order. A lot of systems I 
know would use just a few groups to bound the consumer.

Each group will create an extra POJOs on the Consumers the groups you are 
creating.


Having this many groups exposed a screw up I made, but it will also create 
extra load on the system.


I don't know your use cases... and I'm not rejecting the possibility of bugs 
(every system has bugs.. we try to minimize and avoid them). We try to keep on 
top of them and eliminate them.


Just saying take a look on grouping from that side.


was (Author: clebertsuconic):
Also: consider the meaning of a group.

A group usually bounds messages to a specific consumer. So, in theory you 
should have a handful of consumers processing your messages. a Group will 
ensure that an entire group would arrive to the specific consumer in order. A 
lot of systems I know would use just a few groups to bound the consumer.

Each group will create an extra POJOs on the Consumers the groups you are 
creating.


Having this many groups exposed a screw up I made, but it will also create 
extra load on the system.


I don't know your use cases... and I'm not rejecting the possibility of bugs 
(every system has bugs.. we try to minimize and avoid them). We try to keep on 
top of them and eliminate them.


Just saying take a look on grouping from that side.

> Reaper seems to clog up the journal, and messages fail to deliver
> -----------------------------------------------------------------
>
>                 Key: ARTEMIS-699
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-699
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.3.0
>            Reporter: Michael Brown
>            Assignee: Justin Bertram
>            Priority: Critical
>         Attachments: clustered-grouping.tar.gz
>
>
> We are seeing the exception (below) regularly, and a loss of message 
> delivery, which only goes away if we delete the journal and restart. This is 
> with the following grouping options in broker.xml:
> {code:xml}
>     <grouping-handler name="jms-recordsure-grouping-handler">
>       <type>LOCAL</type>
>       <address>jms</address>
>       <timeout>5000</timeout>
>       <group-timeout>300000</group-timeout>
>       <reaper-period>30000</reaper-period>
>     </grouping-handler>
> {code}
> If we remove timeout/group-timeout/reaper-period the issues go away.
> Having traced through the code I see this issue in LocalGroupHandling.java:
> {code:java}
>                      if (expiredGroups >= 1000 && txID >= 0) {
>                         expiredGroups = 0;
>                         txID = -1;
>                         storageManager.commitBindings(txID);
>                      }
> {code}
> The method 'commitBindings' has (via dependencies) an explicit check that 
> will throw an exception if txID is -1. This code must fail.
> I suggest a fix that moves the reset of txID to be after the commitBindings 
> call, as follows:
> {code:java}
>                      if (expiredGroups >= 1000 && txID >= 0) {
>                         storageManager.commitBindings(txID);
>                         expiredGroups = 0;
>                         txID = -1;
>                      }
> {code}
> {noformat}
> 2016-08-24 13:09:01,660 WARN  [org.apache.activemq.artemis.core.server] 
> AMQ222114: Unable to delete group binding info 
> c2e95857-87ad-455a-ba67-1c63ac351cc8.ad900ba9-69e3-11e6-86b2-0242ac110003: 
> java.lang.IllegalStateException: Cannot find tx with id -1
>         at 
> org.apache.activemq.artemis.core.journal.impl.JournalImpl.appendCommitRecord(JournalImpl.java:1013)
>  [artemis-journal-1.3.0.jar:1.3.0]
>         at 
> org.apache.activemq.artemis.core.journal.impl.JournalBase.appendCommitRecord(JournalBase.java:112)
>  [artemis-journal-1.3.0.jar:1.3.0]
>         at 
> org.apache.activemq.artemis.core.journal.impl.JournalImpl.appendCommitRecord(JournalImpl.java:79)
>  [artemis-journal-1.3.0.jar:1.3.0]
>         at 
> org.apache.activemq.artemis.core.replication.ReplicatedJournal.appendCommitRecord(ReplicatedJournal.java:164)
>  [artemis-server-1.3.0.jar:1.3.0]
>         at 
> org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.commitBindings(AbstractJournalStorageManager.java:650)
>  [artemis-server-1.3.0.jar:1.3.0]
>         at 
> org.apache.activemq.artemis.core.server.group.impl.LocalGroupingHandler$GroupIdReaper.run(LocalGroupingHandler.java:449)
>  [artemis-server-1.3.0.jar:1.3.0]
>         at 
> org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:103)
>  [artemis-core-client-1.3.0.jar:1.3.0]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [rt.jar:1.8.0_102]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [rt.jar:1.8.0_102]
>         at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_102]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to