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

Justin Bertram updated ARTEMIS-4910:
------------------------------------
    Description: 
Modifying divert with transformer in a high-availability (HA) cluster with 
Apache Artemis by {{broker.xml}} results in an {{IndexOutOfBoundsException}} 
error in the backup logs. This error breaks the connection between the primary 
and backup brokers, initiates a quorum vote, and causes the backup to become 
active, leading to both brokers operating in parallel.
h2. Steps to Reproduce the Error

1. Create primary broker
{noformat}
apache-artemis-2.35.0/bin/artemis.cmd create 
--host=localhost 
--default-port=61611 
--http-port=8111 
--clustered 
--cluster-user=cls 
--cluster-password=cls 
--replicated 
--name=br11 
--user=usr 
--password=usr 
--allow-anonymous 
--no-autotune 
--no-amqp-acceptor 
--no-hornetq-acceptor 
--no-mqtt-acceptor 
--no-stomp-acceptor 
br11{noformat}

2. Create backup broker
{noformat}
apache-artemis-2.35.0/bin/artemis.cmd create 
--host=localhost 
--default-port=61612 
--http-port=8112 
--clustered 
--cluster-user=cls 
--cluster-password=cls 
--replicated 
--slave 
--name=br12 
--user=usr 
--password=usr 
--allow-anonymous 
--no-autotune 
--no-amqp-acceptor 
--no-hornetq-acceptor 
--no-mqtt-acceptor 
--no-stomp-acceptor 
br12{noformat}

3. Start brokers
4. Add test addresses to primary {{broker.xml}}:
{code:xml}
<address name="TEST.IN">
   <anycast>
      <queue name="TEST.IN"/>
   </anycast>
</address>
<address name="TEST.OUT">
   <anycast>
      <queue name="TEST.OUT"/>
   </anycast>
</address>{code}

5. Add divert with transformer to primary broker.xml
{code:xml}
<diverts>
   <divert name="TEST-DIVERT">
      <address>TEST.IN</address>
      <forwarding-address>TEST.OUT</forwarding-address>
      <filter string="LABEL='Test'"/>
      <transformer>
         
<class-name>org.apache.activemq.artemis.core.server.transformer.AddHeadersTransformer</class-name>
      </transformer>
   </divert>
</diverts>{code}
h2. Result
 - an {{IndexOutOfBoundsException}} error will appear in the backup logs
 - the connection between primary and backup will be broken
 - a quorum vote will be initiated
 - the backup will become active and will operate in parallel with the primary

  was:
Modifying divert with transformer in a high-availability (HA) cluster with 
Apache Artemis by broker.xml results in an _IndexOutOfBoundsException_ error in 
the backup logs. This error breaks the connection between the primary and 
backup brokers, initiates a quorum vote, and causes the backup to become 
active, leading to both brokers operating in parallel.
h2. Steps to Reproduce the Error

1. Create primary broker

{{apache-artemis-2.35.0/bin/artemis.cmd create `}}
{{--host=localhost `}}
{{--default-port=61611 `}}
{{--http-port=8111 `}}
{{--clustered `}}
{{--cluster-user=cls `}}
{{--cluster-password=cls `}}
{{--replicated `}}
{{--name=br11 `}}
{{--user=usr `}}
{{--password=usr `}}
{{--allow-anonymous `}}
{{--no-autotune `}}
{{--no-amqp-acceptor `}}
{{--no-hornetq-acceptor `}}
{{--no-mqtt-acceptor `}}
{{--no-stomp-acceptor `}}
{{br11}}

2. Create backup broker

{{apache-artemis-2.35.0/bin/artemis.cmd create `}}
{{--host=localhost `}}
{{--default-port=61612 `}}
{{--http-port=8112 `}}
{{--clustered `}}
{{--cluster-user=cls `}}
{{--cluster-password=cls `}}
{{--replicated `}}
{{--slave `}}
{{--name=br12 `}}
{{--user=usr `}}
{{--password=usr `}}
{{--allow-anonymous `}}
{{--no-autotune `}}
{{--no-amqp-acceptor `}}
{{--no-hornetq-acceptor `}}
{{--no-mqtt-acceptor `}}
{{--no-stomp-acceptor `}}
{{br12}}

3. Start brokers
4. Add test addresses to primary broker.xml

{{<address name="TEST.IN">}}
{{<anycast>}}
{{<queue name="TEST.IN"/>}}
{{</anycast>}}
{{</address>}}
{{<address name="TEST.OUT">}}
{{<anycast>}}
{{<queue name="TEST.OUT"/>}}
{{</anycast>}}
{{</address>}}

5. Add divert with transformer to primary broker.xml

{{<diverts>}}
{{<divert name="TEST-DIVERT">}}
{{<address>TEST.IN</address>}}
{{<forwarding-address>TEST.OUT</forwarding-address>}}
{{<filter string="LABEL='Test'"/>}}
{{<transformer>}}
{{<class-name>org.apache.activemq.artemis.core.server.transformer.AddHeadersTransformer</class-name>}}
{{</transformer>}}
{{</divert>}}
{{</diverts>}}
h2. Result
 - an IndexOutOfBoundsException error will appear in the backup logs
 - the connection between primary and backup will be broken
 - a quorum vote will be initiated
 - the backup will become active and will operate in parallel with the primary


> Synchronization of HA cluster after modifying divert with transformer failure
> -----------------------------------------------------------------------------
>
>                 Key: ARTEMIS-4910
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4910
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker, Clustering, Configuration
>    Affects Versions: 2.35.0
>            Reporter: Kirill Chadakin
>            Priority: Major
>         Attachments: backup_artemis.log, primary_artemis.log
>
>
> Modifying divert with transformer in a high-availability (HA) cluster with 
> Apache Artemis by {{broker.xml}} results in an {{IndexOutOfBoundsException}} 
> error in the backup logs. This error breaks the connection between the 
> primary and backup brokers, initiates a quorum vote, and causes the backup to 
> become active, leading to both brokers operating in parallel.
> h2. Steps to Reproduce the Error
> 1. Create primary broker
> {noformat}
> apache-artemis-2.35.0/bin/artemis.cmd create 
> --host=localhost 
> --default-port=61611 
> --http-port=8111 
> --clustered 
> --cluster-user=cls 
> --cluster-password=cls 
> --replicated 
> --name=br11 
> --user=usr 
> --password=usr 
> --allow-anonymous 
> --no-autotune 
> --no-amqp-acceptor 
> --no-hornetq-acceptor 
> --no-mqtt-acceptor 
> --no-stomp-acceptor 
> br11{noformat}
> 2. Create backup broker
> {noformat}
> apache-artemis-2.35.0/bin/artemis.cmd create 
> --host=localhost 
> --default-port=61612 
> --http-port=8112 
> --clustered 
> --cluster-user=cls 
> --cluster-password=cls 
> --replicated 
> --slave 
> --name=br12 
> --user=usr 
> --password=usr 
> --allow-anonymous 
> --no-autotune 
> --no-amqp-acceptor 
> --no-hornetq-acceptor 
> --no-mqtt-acceptor 
> --no-stomp-acceptor 
> br12{noformat}
> 3. Start brokers
> 4. Add test addresses to primary {{broker.xml}}:
> {code:xml}
> <address name="TEST.IN">
>    <anycast>
>       <queue name="TEST.IN"/>
>    </anycast>
> </address>
> <address name="TEST.OUT">
>    <anycast>
>       <queue name="TEST.OUT"/>
>    </anycast>
> </address>{code}
> 5. Add divert with transformer to primary broker.xml
> {code:xml}
> <diverts>
>    <divert name="TEST-DIVERT">
>       <address>TEST.IN</address>
>       <forwarding-address>TEST.OUT</forwarding-address>
>       <filter string="LABEL='Test'"/>
>       <transformer>
>          
> <class-name>org.apache.activemq.artemis.core.server.transformer.AddHeadersTransformer</class-name>
>       </transformer>
>    </divert>
> </diverts>{code}
> h2. Result
>  - an {{IndexOutOfBoundsException}} error will appear in the backup logs
>  - the connection between primary and backup will be broken
>  - a quorum vote will be initiated
>  - the backup will become active and will operate in parallel with the primary



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to