[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17850126#comment-17850126 ] ritesh adval commented on AMQ-9504: --- ok thx [~cshannon] for the update. > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > When using Multi KahaDB persistence adapter according to [the > documentation|https://activemq.apache.org/components/classic/documentation/kahadb] > it shows that you can use multiple {{filteredPersistenceAdapters}} but this > does not work if you have two filtered adapter where one is using wildcard > match for topics (or even a specific topic) and second filtered adapter using > per destination filtered adapter. > The idea being you want to use one KahaDB instance for all the topics and per > destination KahaDB instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note JMX > needs to be enabled) : > {code:xml} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > {noformat} > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:415) > at > org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:93) > at > org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:251) > at > org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55) > at > org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter.doStart(MultiKahaDBPersistenceAdapter.java:381) > at > org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849115#comment-17849115 ] Christopher L. Shannon commented on AMQ-9504: - Yeah, it would be a problem because it's trying to create duplicate adapters touching the same directory, so it's definitely not going to work right. Turning off JMX as you have shown just pushes the problem downstream if you configure things that way and will cause things to break. The vast majority of people do not use multiKahaDB and if they do obviously don't configure it this way (most people that use the option to create a store per destination set up their config with that as the only filter) otherwise it would have been reported way before now. Is there a reason why you can't build a custom version with the patch temporarily? One of the benefits of using open source like this is you can do whatever you want, you can build your own version at any point. I know you want to use an official release but building your own version with the fix is the fastest way for now. Our plan is to do a 6.2.0 release in the next couple of weeks, after that we could look at doing a 5.18.5 release which would include this fix, but again, I'm not really sure on an exact timeline so if it's that high of a priority you will need to build your own version temporarily until the new version is out. > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > When using Multi KahaDB persistence adapter according to [the > documentation|https://activemq.apache.org/components/classic/documentation/kahadb] > it shows that you can use multiple {{filteredPersistenceAdapters}} but this > does not work if you have two filtered adapter where one is using wildcard > match for topics (or even a specific topic) and second filtered adapter using > per destination filtered adapter. > The idea being you want to use one KahaDB instance for all the topics and per > destination KahaDB instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note JMX > needs to be enabled) : > {code:xml} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > {noformat} > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepositor
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849076#comment-17849076 ] ritesh adval commented on AMQ-9504: --- ok thx for the update. For us its a high priority issue, because the functionality of multi kahadb is broken as soon as the broker is restarted (with configuration we have in this issue). Moreover it seems it would in fact causes DATA CORRUPTION because there are two KahaDBPersistenceAdapter running on same directory when you turn off jmx. The jmx=true exhibits the issue where we get an exception to register the same mbean twice, but if we set jmx to false. then it silently would start two KahaDBPersistenceAdapter and test will not fail. if you set the jmx to false you will see below (this the log from test after we restart the broker), note it goes into PageFile recovery after restart, there will not be any exception thrown in the test but two KahaDBPersistenceAdapter are allowed to run on same directory which is not good. Also I think it would good log a line in KahaDBPersistenceAdapter when it starts on a directory... currently its very hard to know from logs how many of these are configured and running. 2024-05-23 11:31:04,297 [main ] - INFO BrokerService - Using Persistence Adapter: MultiKahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB][KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e]] 2024-05-23 11:31:04,298 [main ] - INFO BrokerService - Starting Persistence Adapter: MultiKahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB][KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e]] 2024-05-23 11:31:04,331 [main ] - INFO KahaDBStore - Starting KahaDBStore 2024-05-23 11:31:04,335 [main ] - INFO MessageDatabase - Opening MessageDatabase 2024-05-23 11:31:04,413 [main ] - INFO MessageDatabase - KahaDB is version 7 2024-05-23 11:31:04,551 [main ] - INFO KahaDBStore - Starting KahaDBStore 2024-05-23 11:31:04,561 [main ] - INFO MessageDatabase - Opening MessageDatabase 2024-05-23 11:31:04,619 [main ] - INFO MessageDatabase - KahaDB is version 7 2024-05-23 11:31:04,631 [main ] - INFO KahaDBStore - Starting KahaDBStore 2024-05-23 11:31:04,633 [main ] - INFO MessageDatabase - Opening MessageDatabase *2024-05-23 11:31:04,699 [e Page Recovery] - INFO PageFile - Page File: target/activemq-data/mKahaDB/topic#3a#2f#2f#3e/db.data. Recovering pageFile free list due to prior unclean shutdown..* *2024-05-23 11:31:04,703 [main ] - INFO MessageDatabase - KahaDB is version 7* *2024-05-23 11:31:04,726 [e Page Recovery] - INFO PageFile - Page File: target/activemq-data/mKahaDB/topic#3a#2f#2f#3e/db.data. Recovered pageFile free list of size: 0* *2024-05-23 11:31:04,730 [main ] - INFO MessageDatabase - Recovering from the journal @1:622* *2024-05-23 11:31:04,738 [main ] - INFO MessageDatabase - Recovery replayed 1 operations from the journal in 0.018 seconds.* 2024-05-23 11:31:04,740 [main ] - INFO BrokerService - Starting Temp Data Store 2024-05-23 11:31:04,742 [main ] - INFO PListStoreImpl - PListStore:[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/localhost/tmp_storage] started 2024-05-23 11:31:04,743 [main ] - INFO BrokerService - Starting Job Scheduler Store 2024-05-23 11:31:04,744 [main ] - INFO BrokerService - Persistence Adapter successfully started > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848699#comment-17848699 ] Christopher L. Shannon commented on AMQ-9504: - Any dates are just an estimate and there is no guarantee. This is definitely not a high priority thing that is going to cause us to rush a release so I can't tell you when it will be released as the focus is on the newer 6.x releases now. Asking other people isn't going to change the answer. > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:415) > at > org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:93) > at > org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:251) > at > org.apache.activemq.u
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848695#comment-17848695 ] ritesh adval commented on AMQ-9504: --- We are still on jdk 11 and would like to use next release 5.18.5. it seems the page here shows ETA of june 24th for next 5.18.5 release [https://activemq.apache.org/components/classic/download/] let me know if this will happen or should I address the release question to someone else who does it ? Would like this patch release available sooner if possible so we can use it. Thx > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:415) > at > org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:93) > at > org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doSta
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848684#comment-17848684 ] Christopher L. Shannon commented on AMQ-9504: - 6.2.0 should be getting prepared for release before too long but I'm not sure about 5.18.5, there's not much else pressing at the moment for a release. > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:415) > at > org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:93) > at > org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:251) > at > org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55) > at > org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter.doStart(MultiK
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848667#comment-17848667 ] ritesh adval commented on AMQ-9504: --- This is great, thanks [~cshannon] for applying the patch, can you please let me know if there will be a new patch release from activemq-5.18.x release branch ? I would look to use official release version with this fix. > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:415) > at > org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:93) > at > org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:251) > at > org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55) > at > org.apache.activemq.store.kah
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848632#comment-17848632 ] ASF subversion and git services commented on AMQ-9504: -- Commit a12f030090bdf593b4c7bbaf10cd2d553f14bf89 in activemq's branch refs/heads/activemq-5.18.x from Christopher L. Shannon [ https://gitbox.apache.org/repos/asf?p=activemq.git;h=a12f03009 ] AMQ-9504 - Add missing license header (cherry picked from commit 527d245831fb95fa3a25180ecf404d5a316f2425) > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:415) > at > org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:93) > at > org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:251) > at
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848629#comment-17848629 ] ASF subversion and git services commented on AMQ-9504: -- Commit 527d245831fb95fa3a25180ecf404d5a316f2425 in activemq's branch refs/heads/main from Christopher L. Shannon [ https://gitbox.apache.org/repos/asf?p=activemq.git;h=527d24583 ] AMQ-9504 - Add missing license header > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:415) > at > org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:93) > at > org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:251) > at > org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55) >
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848630#comment-17848630 ] ASF subversion and git services commented on AMQ-9504: -- Commit ba3d395fc3f077f41381ad801f2a898caebb1eaa in activemq's branch refs/heads/activemq-6.1.x from Christopher L. Shannon [ https://gitbox.apache.org/repos/asf?p=activemq.git;h=ba3d395fc ] AMQ-9504 - Add missing license header (cherry picked from commit 527d245831fb95fa3a25180ecf404d5a316f2425) > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:415) > at > org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:93) > at > org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:251) > at
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848617#comment-17848617 ] ASF subversion and git services commented on AMQ-9504: -- Commit c71965176ac4acec78779fbc626c98fc310603e1 in activemq's branch refs/heads/activemq-5.18.x from Christopher L. Shannon [ https://gitbox.apache.org/repos/asf?p=activemq.git;h=c71965176 ] AMQ-9504 - Prevent registering duplicate mKahadb adapters This fixes an issue on start up of a broker that is configured with multiple mKahaDB filtered adapters and one is configured with perDestination=true. Before this fix a duplicate persistence adapter could be created because the filter did not check for existing matches. Patch applied with thanks to Ritesh Adval (cherry picked from commit ddfb36515c0e9588d2e322365f56a3f53fb094ad) > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) >
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848615#comment-17848615 ] ASF subversion and git services commented on AMQ-9504: -- Commit d719df23007393660547b58c9ff17c3d0bd72f8a in activemq's branch refs/heads/activemq-6.1.x from Christopher L. Shannon [ https://gitbox.apache.org/repos/asf?p=activemq.git;h=d719df230 ] AMQ-9504 - Prevent registering duplicate mKahadb adapters This fixes an issue on start up of a broker that is configured with multiple mKahaDB filtered adapters and one is configured with perDestination=true. Before this fix a duplicate persistence adapter could be created because the filter did not check for existing matches. Patch applied with thanks to Ritesh Adval (cherry picked from commit ddfb36515c0e9588d2e322365f56a3f53fb094ad) > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) >
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848614#comment-17848614 ] ASF subversion and git services commented on AMQ-9504: -- Commit ddfb36515c0e9588d2e322365f56a3f53fb094ad in activemq's branch refs/heads/main from Christopher L. Shannon [ https://gitbox.apache.org/repos/asf?p=activemq.git;h=ddfb36515 ] AMQ-9504 - Prevent registering duplicate mKahadb adapters This fixes an issue on start up of a broker that is configured with multiple mKahaDB filtered adapters and one is configured with perDestination=true. Before this fix a duplicate persistence adapter could be created because the filter did not check for existing matches. Patch applied with thanks to Ritesh Adval > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Assignee: Christopher L. Shannon >Priority: Major > Fix For: 6.2.0, 5.18.5, 6.1.3 > > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(Mana
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848442#comment-17848442 ] ritesh adval commented on AMQ-9504: --- It is as if you look at the documentation at [https://activemq.apache.org/components/classic/documentation/kahadb] , first of all multiple filteredKahaDB are allowed as also shown in the example in above link. "Each instance of {{kahaDB}} can be configured independently. If no destination is supplied to a {{{}filteredKahaDB{}}}, the implicit default value will match any destination, queue or topic." This is a handy catch all. If no matching persistence adapter can be found, destination creation will fail with an exception. The {{filteredKahaDB}} shares its wildcard matching rules with [Per Destination Policies|https://activemq.apache.org/components/classic/documentation/per-destination-policies]. and also: "Set {{perDestination="true"}} on the catch all, i.e., when no explicit destination is set, {{filteredKahaDB}} entry. Each matching destination will be assigned its own {{kahaDB}} instance." And I tested it and it works just not on restart of the broker due the bug and fix seems to have fixed the issue. > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Priority: Major > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBe
[jira] [Commented] (AMQ-9504) activemq multikahadb persistence adapter with topic wildcard filtered adapter and per destination filtered adapter causes broker failure on restart
[ https://issues.apache.org/jira/browse/AMQ-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848405#comment-17848405 ] Christopher L. Shannon commented on AMQ-9504: - This probably needs to be looked at more and i'm not sure if "perDestination" was meant to work for this use case > activemq multikahadb persistence adapter with topic wildcard filtered adapter > and per destination filtered adapter causes broker failure on restart > --- > > Key: AMQ-9504 > URL: https://issues.apache.org/jira/browse/AMQ-9504 > Project: ActiveMQ Classic > Issue Type: Bug > Components: Broker >Affects Versions: 5.18.4, 6.1.2 >Reporter: ritesh adval >Priority: Major > Attachments: bugfix.patch, test.patch > > > when using Multikahadb persistence adapter per documentation : > [https://activemq.apache.org/components/classic/documentation/kahadb] it > shows that you can use multiple filteredPersistenceAdapters but this does not > work if you have two filtered adapter where one is using wildcard match for > topics (or even a specific topic) and second filtered adapter using per > destination filtered adapter. > The idea being you want to use one kahadb instance for all the topics and per > destination kahadb instance for all other destinations like queues. Something > like this for illustration of the issue see test for more details. (note jmx > needs to be enabled) : > {code:java} > > > > > > > > > > > > > > > > > > > > > > > {code} > With this setting it works for the first time when broker is started. But as > soon as you have atleast one topic created which uses wild card filtered > adapter and you restart the broker, then what happens is there are two > KahaDBPersistenceAdapter created one by the wildcard (">") topic filtered > adapter and another one by the second per destination filtered adapter, and > so second KahaDBPersistenceAdapter fails with below exception: > > [INFO] Running org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.20 > s <<< FAILURE! – in > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest > [ERROR] > org.apache.activemq.bugs.MultiKahaDBMultipleFilteredAdapterTest.testTopicWildcardAndPerDestinationFilteredAdapter > – Time elapsed: 11.08 s <<< ERROR! > javax.management.InstanceAlreadyExistsException: > org.apache.activemq:type=Broker,brokerName=localhost,service=PersistenceAdapter,instanceName=KahaDBPersistenceAdapter[/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e|#3a#2f#2f#3e_Index_/mnt/c/Users/ritesh.adval/work/external-repos/activemq/activemq-unit-tests/target/activemq-data/mKahaDB/topic#3a#2f#2f#3e] > at > java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1855) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:955) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:890) > at > java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320) > at > java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) > at > org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:415) > at > org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:93) > at > org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter.doStart(KahaDBPersistenceAdapter.java:251) > at > org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55) > at > org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter.doStart(MultiKahaDBPersistenceAdapter.java:381) > at > org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55) > a