Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-4615

Last topic event is reprocessed all the time when the Replica is assigned as a Leader

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • IBM BAMOE 8.FUTURE
    • 7.11.1.GA
    • jBPM Core
    • None
    • False
    • None
    • False
    • User Experience
    • Hide
      1. Run client program to invoke 3 events:
         mvn exec:java -Dexec.mainClass="org.kie.hacep.sample.client.ClientProducerDemo"
         mvn exec:java -Dexec.mainClass="org.kie.hacep.sample.client.ClientProducerDemo"
         mvn exec:java -Dexec.mainClass="org.kie.hacep.sample.client.ClientProducerDemo"
      2. Check the Springboot pod (defaultKafkaConsumer Leader) log. 3 Topic event published as below:

      2022-11-09 02:24:21.849  INFO 1 — [pool-1-thread-1] o.k.h.c.i.election.LeaderElectionImpl    : Pod[ha-kieserver-app-f7f5b897d-6z87j] Current pod is becoming the new LEADER now...
      2022-11-09 02:24:21.850  INFO 1 — [pool-1-thread-1] o.k.h.c.i.consumer.DefaultKafkaConsumer  : enableConsumeAndStartLoop:LEADER
      Stock company RHT price: 96.0
      [Side Effect] Price for RHT is 96.0 id:c2aa18b4-39a8-4538-81a4-d88d94c581c5
      Number of StockTickEvent 1
      Stock company RHT price: 89.0
      [Side Effect] Price for RHT is 89.0 id:f0f8b645-dc26-4a17-a9c5-3a842763f4eb
      Number of StockTickEvent 2
      Stock company RHT price: 81.0
      [Side Effect] Price for RHT is 81.0 id:aac6dbb4-1589-411e-ac23-4c0d6242b882
      Number of StockTickEvent 3

      # Delete #2 pod

      1. Check the other Springboot pod (enableConsumeAndStartLoop:REPLICA). The above 3 Topic event reprocess again:
        Here is configuration related information in the log file and I am attaching customer's and my test logs.

        CONFIGURE on start engine:EnvConfig{namespace='default', eventsTopicName='events', controlTopicName='control', snapshotTopicName='snapshot', kieSessionInfosTopicName='kiesessioninfos', printerType='org.kie.hacep.util.PrinterLogImpl', iterationBetweenSnapshot=10, pollTimeout=1000, pollSnapshotTimeout=1, maxSnapshotRequestAttempts=30, skipOnDemanSnapshot=false, maxSnapshotAge=600, test=false, local=false, pollUnit=MILLISECOND, pollUnitSnapshot=SECOND, pollDuration=PT1S, pollSnapshotDuration=PT1S, updatableKJar=false, kJarGAV='null'}

      Show
      Download rhpam-7.11.1-reference-implemenation.zip and prepare sample project   Run client program to invoke 3 events:  mvn exec:java -Dexec.mainClass="org.kie.hacep.sample.client.ClientProducerDemo"  mvn exec:java -Dexec.mainClass="org.kie.hacep.sample.client.ClientProducerDemo"  mvn exec:java -Dexec.mainClass="org.kie.hacep.sample.client.ClientProducerDemo" Check the Springboot pod (defaultKafkaConsumer Leader) log. 3 Topic event published as below: 2022-11-09 02:24:21.849  INFO 1 — [pool-1-thread-1] o.k.h.c.i.election.LeaderElectionImpl    : Pod [ha-kieserver-app-f7f5b897d-6z87j] Current pod is becoming the new LEADER now... 2022-11-09 02:24:21.850  INFO 1 — [pool-1-thread-1] o.k.h.c.i.consumer.DefaultKafkaConsumer  : enableConsumeAndStartLoop:LEADER Stock company RHT price: 96.0 [Side Effect] Price for RHT is 96.0 id:c2aa18b4-39a8-4538-81a4-d88d94c581c5 Number of StockTickEvent 1 Stock company RHT price: 89.0 [Side Effect] Price for RHT is 89.0 id:f0f8b645-dc26-4a17-a9c5-3a842763f4eb Number of StockTickEvent 2 Stock company RHT price: 81.0 [Side Effect] Price for RHT is 81.0 id:aac6dbb4-1589-411e-ac23-4c0d6242b882 Number of StockTickEvent 3 # Delete #2 pod Check the other Springboot pod (enableConsumeAndStartLoop:REPLICA). The above 3 Topic event reprocess again: Here is configuration related information in the log file and I am attaching customer's and my test logs. CONFIGURE on start engine:EnvConfig{namespace='default', eventsTopicName='events', controlTopicName='control', snapshotTopicName='snapshot', kieSessionInfosTopicName='kiesessioninfos', printerType='org.kie.hacep.util.PrinterLogImpl', iterationBetweenSnapshot=10, pollTimeout=1000, pollSnapshotTimeout=1, maxSnapshotRequestAttempts=30, skipOnDemanSnapshot=false, maxSnapshotAge=600, test=false, local=false, pollUnit=MILLISECOND, pollUnitSnapshot=SECOND, pollDuration=PT1S, pollSnapshotDuration=PT1S, updatableKJar=false, kJarGAV='null'}
    • ---
    • ---
    • Important

      As per the documentation, if the leader ceases to function, another replica is automatically made leader and the processing continues per the snapshot without interruption or data loss.

      However, HA-CEP behaves differently as the last topic event is reprocessed all the time when the Replica is assigned as a Leader.

       

              Unassigned Unassigned
              rhn-support-brhan Dongsoo Han
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: