FISH-7273 : new openmq version to avoid duplicate consumers #6350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR depends on: payara/patched-src-openmq#23
Description
Fix Incorrect 'imqcmd' calculations for the number of consumers after cluster restart
The imqcmd utility shipped with Open MQ software in Payara Server has a list destinations command that shows basic statistics of the number of producers, consumers and messages for each destination configured. After a cluster restart, the numbers shown by the command’s output are incorrect on a variable frequency, but close to the actual number to be shown. For example, where the number of consumers is 8 for a specific cluster instance, the number displayed might be 6, 7, 9, 10
Important Info
Dependant PRs
payara/patched-src-openmq#23
Testing
New tests
No
Testing Performed
.\asadmin create-domain --portbase 9000 domain-9000
.\asadmin start-domain domain-9000
.\asadmin copy-config --port 9048 default-config jms-config
.\asadmin create-cluster --port 9048 --config=jms-config test-cluster
.\asadmin configure-jms-cluster --port 9048 --clustertype=conventional --messageStoreType=file --configStoreType=masterbroker test-cluster
Nodes:
.\asadmin create-node-config --port 9048 local-node-1
.\asadmin create-node-config --port 9048 local-node-2
.\asadmin create-node-config --port 9048 local-node-3
.\asadmin create-node-config --port 9048 local-node-4
Instances:
.\asadmin create-instance --port 9048 --cluster=test-cluster --node=local-node-1 ci1
payara6\glassfish\lib> .\nadmin --host HOST_NAME --port 9048 create-local-instance --node local-node-1 ci1
.\asadmin create-instance --port 9048 --cluster=test-cluster --node=local-node-2 ci2
payara6\glassfish\lib> .\nadmin --host HOST_NAME --port 9048 create-local-instance --node local-node-2 ci2
.\asadmin create-instance --port 9048 --cluster=test-cluster --node=local-node-3 ci3
payara6\glassfish\lib> .\nadmin --host HOST_NAME --port 9048 create-local-instance --node local-node-3 ci3
.\asadmin create-instance --port 9048 --cluster=test-cluster --node=local-node-4 ci4
payara6\glassfish\lib> .\nadmin --host HOST_NAME --port 9048 create-local-instance --node local-node-4 ci4
.\asadmin create-instance --port 9048 --cluster=test-cluster --node=local-node-1 ci5
payara6\glassfish\lib> .\nadmin --host HOST_NAME --port 9048 create-local-instance --node local-node-1 ci5
.\asadmin create-instance --port 9048 --cluster=test-cluster --node=local-node-2 ci6
payara6\glassfish\lib> .\nadmin --host HOST_NAME --port 9048 create-local-instance --node local-node-2 ci6
.\asadmin create-instance --port 9048 --cluster=test-cluster --node=local-node-3 ci7
payara6\glassfish\lib> .\nadmin --host HOST_NAME --port 9048 create-local-instance --node local-node-3 ci7
.\asadmin create-instance --port 9048 --cluster=test-cluster --node=local-node-4 ci8
payara6\glassfish\lib> .\nadmin --host HOST_NAME --port 9048 create-local-instance --node local-node-4 ci8
Config LOCAL
.\asadmin set configs.config.jms-config.availability-service.jms-availability.availability-enabled=false --port=9048
.\asadmin set configs.config.jms-config.jms-service.type=LOCAL --port=9048
Create 2 new JMS resources:
.\asadmin create-connector-connection-pool --connectionDefinitionName=jakarta.jms.QueueConnectionFactory --resourceAdapterName=jmsra jms/SampleConnectionFactory-Connection-Pool --port=9048
.\asadmin create-connector-resource --objecttype=user --enabled=true --poolName=jms/SampleConnectionFactory-Connection-Pool jms/SampleConnectionFactory --port=9048
.\asadmin create-jms-resource --resType=jakarta.jms.Queue --property=Name=sampleQueue --enabled=true jms/SampleQueue --port=9048
.\asadmin create-resource-ref --enabled=true --target=test-cluster jms/SampleConnectionFactory --port=9048
.\asadmin create-resource-ref --enabled=true --target=test-cluster jms/SampleQueue --port=9048
.\asadmin deploy --port=9048 --target=test-cluster --name=JMS-Test C:\code\reproducers\reproducer-7273\JMSGeneralTest\target\JMSGeneralTest-1.0-SNAPSHOT.war
start the instances:
.\asadmin start-instance --port=9048 ci1
.\asadmin start-instance --port=9048 ci2
.\asadmin start-instance --port=9048 ci3
...
.\asadmin start-instance --port=9048 ciN
Run the imqcmd list dst command (default user/password: admin/admin)
\Payara\appserver\distributions\payara\target\stage\payara6\mq\bin> .\imqcmd -b HOST_NAME:27676 list dst
\Payara\appserver\distributions\payara\target\stage\payara6\mq\bin> .\imqcmd -b HOST_NAME:27677 list dst
...
\Payara\appserver\distributions\payara\target\stage\payara6\mq\bin> .\imqcmd -b HOST_NAME:27683 list dst
For each PORT should return the correct number of Consumers created
Test suites executed
Testing Environment
Zulu JDK 1.8_212 on Windows 11 with Maven 3.6.0
Notes for Reviewers
In my local tests with only 3 instances: ci1, ci2 and ci3 I could reproduce th problem
Running the command on ci2: \Payara\appserver\distributions\payara\target\stage\payara6\mq\bin> .\imqcmd -b HOST_NAME:27677 list dst
It returned 4 instead of 3