Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocreated destinations cannot be removed #402

Open
glassfishrobot opened this issue Nov 7, 2017 · 1 comment
Open

Autocreated destinations cannot be removed #402

glassfishrobot opened this issue Nov 7, 2017 · 1 comment

Comments

@glassfishrobot
Copy link

Runing an enhanced broker cluster with mysql store we see that autocreated queues are not removed from DST table when destination is supposed to be destroyed.

Calling a simple consumer on a nonexsiting queue creates the destination:
java -jar /tools/jms-tests/consumer.jar 3000 xx.xx.xx.xx 37676 testdel
We can see it exists:
imqcmd -b xx.xx.xx.xx:37676 -u admin -pw admin query dst -t q -n testdel

Destination Name Destination Type

testdel Queue

On the broker specified by:


Host Primary Port

xx.xx.xx.xx 37676

Destination Name testdel
Destination Type Queue
Destination State RUNNING
Created Administratively false

Current Number of Messages
Actual 0
Remote 0
Held in Transaction 0
Current Message Bytes
Actual 0
Remote 0
Held in Transaction 0
Current Number of Producers 0
Current Number of Active Consumers 0
Current Number of Backup Consumers 0

Max Number of Messages 100000
Max Total Message Bytes 10737418240
Max Bytes per Message 10485760
Max Number of Producers 100
Max Number of Active Consumers unlimited (-1)
Max Number of Backup Consumers 0

Limit Behavior REJECT_NEWEST
Consumer Flow Limit 1000
Is Local Destination false
Local Delivery is Preferred false
Use Dead Message Queue true
XML schema validation enabled false
XML schema URI List -
Reload XML schema on failure false

Successfully queried the destination.

After we get: Destroying auto-created destination testdel [Queue] inactive for 7200 seconds and destination destroyed message, we can still see queue with query dst.

calling destroy also has no effect
imqcmd -b xx.xx.xx.xx:37676 -u admin -pw admin destroy dst -t q -n testdel

Query that should remove destination looks like this (for both reap and destroy):

DELETE FROM MQDST41Cmqm WHERE ID = 'Q:testdel' AND NOT EXISTS (SELECT * FROM MQMSG41Cmqm WHERE DESTINATION_ID = 'Q:testdel') AND NOT EXISTS (SELECT * FROM MQBKR41Cmqm WHERE ID <> 'b1' AND STATE = 1)

From what i understand, the last NOT EXISTS (SELECT * FROM MQBKR41Cmqm WHERE ID <> 'b1' AND STATE = 1) would basicly translate into "if there isn't any other active broker in cluster" , so that means we cannot remove any autocreated destination if there are other active nodes in the cluster.

@glassfishrobot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant