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

Bhavesh Kharwa commented on ARTEMIS-2445:
-----------------------------------------

I have gone thru the code of artemis-server module and below are my findings. 
The _org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl. 
route(message,context,direct,rejectDuplicates,bindingMove)_ method clean the 
internal properties from the Message. Is there any reason to cleanup those 
properties. As I am getting above error because the properties 
"*_AMQ_ROUTE_TO$.artemis.internal.sf.my-cluster.68d83229-be54-11e9-824e-f8b156cb82da*"
 is not present in message properties

We are cleaning up internal properties based on following condition.

{code:java}
package org.apache.activemq.artemis.core.message.impl
    public class CoreMessage extends RefCountMessage implements ICoreMessage {
       private static final Predicate<SimpleString> 
INTERNAL_PROPERTY_NAMES_PREDICATE =
          name -> (name.startsWith(Message.HDR_ROUTE_TO_IDS) && 
!name.equals(Message.HDR_ROUTE_TO_IDS)) ||
             (name.startsWith(Message.HDR_ROUTE_TO_ACK_IDS) && 
!name.equals(Message.HDR_ROUTE_TO_ACK_IDS));
}
{code}

> Large message lost for divert
> -----------------------------
>
>                 Key: ARTEMIS-2445
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2445
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.9.0
>            Reporter: Bhavesh Kharwa
>            Priority: Major
>             Fix For: 2.10.0
>
>         Attachments: server1-master.xml, server2-master.xml
>
>
>  
> I have following queue setup in cluster:
>  * server1 running on 61616
>  * server2 running on 61617
> I start two consumer with two different available master server
>  {noformat}
> java -jar AmqJmsConsume.jar -duration 5 -queue IT-InputQueue -stats -log
> /tmp/artemis/4 -verify -commitdelay 300 -url 'tcp://localhost:61616'
> java -jar AmqJmsConsume.jar -duration 5 -queue IT-InputQueue -stats -log
> /tmp/artemis/4 -verify -commitdelay 300 -url 'tcp://localhost:61617' 
> {noformat}
> and run producer to server1 as below 
>  {noformat}
> java -jar AmqJmsProducer.jar -topic RFTopic -stats -log /tmp/artemis/4 -id
> -count 500 -n 500 -ttl 3600000 -url 'tcp://localhost:61616' -outliers 100
> -outliersize 500k
> {noformat}
> both consumer gets few message but after below exception server1 clears queue 
> with almost 50% of messages but rest of messages are stuck with 
> internal.sf.cluster queue and not received by any consumer.
> {noformat}
> java.lang.IllegalStateException: no queueIDs defined
>     at 
> org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionBridge.beforeForward(ClusterConnectionBridge.java:182)
>  [artemis-server-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.handle(BridgeImpl.java:653)
>  [artemis-server-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl.handle(QueueImpl.java:3346)
>  [artemis-server-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl.deliver(QueueImpl.java:2606)
>  [artemis-server-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl.access$2300(QueueImpl.java:117)
>  [artemis-server-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:3613)
>  [artemis-server-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
>  [artemis-commons-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
>  [artemis-commons-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66)
>  [artemis-commons-2.9.0.jar:2.9.0]
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  [rt.jar:1.8.0_211]
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  [rt.jar:1.8.0_211]
>     at 
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
>  [artemis-commons-2.9.0.jar:2.9.0]
> 2019-07-29 10:21:38,503 WARN  
> [org.apache.activemq.artemis.core.server.impl.QueueImpl] null: 
> java.util.NoSuchElementException
>     at 
> org.apache.activemq.artemis.utils.collections.PriorityLinkedListImpl$PriorityLinkedListIterator.repeat(PriorityLinkedListImpl.java:172)
>  [artemis-commons-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl.deliver(QueueImpl.java:2627)
>  [artemis-server-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl.access$2300(QueueImpl.java:117)
>  [artemis-server-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:3613)
>  [artemis-server-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
>  [artemis-commons-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
>  [artemis-commons-2.9.0.jar:2.9.0]
>     at 
> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66)
>  [artemis-commons-2.9.0.jar:2.9.0]
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  [rt.jar:1.8.0_211]
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  [rt.jar:1.8.0_211]
>     at 
> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
>  [artemis-commons-2.9.0.jar:2.9.0]
> {noformat}
> Also please find attached server1-master and server2-master broker file.
> For reproducibility : Download client code from github url: 
> github.com/erik-wramner/JmsTools.git.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to