activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhuman (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (AMQ-4271) <virtualSelectorCacheBrokerPlugin/> should be able to cache consumers with no selectors as well
Date Thu, 11 Aug 2016 19:09:20 GMT

    [ https://issues.apache.org/jira/browse/AMQ-4271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417759#comment-15417759
] 

Bhuman  edited comment on AMQ-4271 at 8/11/16 7:08 PM:
-------------------------------------------------------

The issue is still persist looks like Below is my scenario.

I am using activemq 5.10 version.For publishing message am using VirtualTopic and also have
<virtualTopic selectorAware="true"/> in broker xml.
I have a consumer queue which consume message from this virtual topic.All the things work
fine when the my consumer is up but once the consumer goes down or not active I am loosing
the message.After configuring <virtualSelectorCacheBrokerPlugin/> in broker.xml I am
getting   below error on activemq log console. I have attached my activemq broker config file.

jvm 1    | ERROR | Unable to read persisted selector cache...it will be ignored!
jvm 1    | java.io.EOFException
jvm 1    |      at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.io.ObjectInputStream.readStreamHeader(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.io.ObjectInputStream.<init>(Unknown Source)[:1.8.0_101]
jvm 1    |      at org.apache.activemq.plugin.SubQueueSelectorCacheBroker.readCache(SubQueueSelectorCacheBroker.java:115)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.plugin.SubQueueSelectorCacheBroker.<init>(SubQueueSelectorCacheBroker.java:74)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.plugin.SubQueueSelectorCacheBrokerPlugin.installPlugin(SubQueueSelectorCacheBrokerPlugin.java:42)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.addInterceptors(BrokerService.java:2295)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:2156)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:937)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.getAdminConnectionContext(BrokerService.java:2426)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.startVirtualConsumerDestinations(BrokerService.java:2566)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:2417)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:667)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:659)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:595)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)[activemq-spring-5.10.0.jar:5.10.0]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_101]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.lang.reflect.Method.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1638)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1579)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)[xbean-spring-3.16.jar:3.16]
jvm 1    |      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)[xbean-spring-3.16.jar:3.16]
jvm 1    |      at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)[activemq-spring-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)[activemq-spring-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)[activemq-spring-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_101]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.lang.reflect.Method.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[activemq.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.10.0]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_101]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.lang.reflect.Method.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)[wrapper.jar:3.2.3]



was (Author: bhuman.vyas@gmail.com):
Hi Dejan,
The issue is still persist looks like Below is my scenario.

I am using activemq 5.10 version.For publishing message am using VirtualTopic and also have
<virtualTopic selectorAware="true"/> in broker xml.
I have a consumer queue which consume message from this virtual topic.All the things work
fine when the my consumer is up but once the consumer goes down or not active I am loosing
the message.After configuring <virtualSelectorCacheBrokerPlugin/> in broker.xml I am
getting   below error on activemq log console.

jvm 1    | ERROR | Unable to read persisted selector cache...it will be ignored!
jvm 1    | java.io.EOFException
jvm 1    |      at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.io.ObjectInputStream.readStreamHeader(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.io.ObjectInputStream.<init>(Unknown Source)[:1.8.0_101]
jvm 1    |      at org.apache.activemq.plugin.SubQueueSelectorCacheBroker.readCache(SubQueueSelectorCacheBroker.java:115)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.plugin.SubQueueSelectorCacheBroker.<init>(SubQueueSelectorCacheBroker.java:74)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.plugin.SubQueueSelectorCacheBrokerPlugin.installPlugin(SubQueueSelectorCacheBrokerPlugin.java:42)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.addInterceptors(BrokerService.java:2295)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:2156)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:937)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.getAdminConnectionContext(BrokerService.java:2426)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.startVirtualConsumerDestinations(BrokerService.java:2566)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:2417)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:667)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:659)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:595)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)[activemq-spring-5.10.0.jar:5.10.0]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_101]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.lang.reflect.Method.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1638)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1579)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
jvm 1    |      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)[xbean-spring-3.16.jar:3.16]
jvm 1    |      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)[xbean-spring-3.16.jar:3.16]
jvm 1    |      at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:104)[activemq-spring-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)[activemq-spring-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)[activemq-spring-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)[activemq-broker-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)[activemq-console-5.10.0.jar:5.10.0]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_101]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.lang.reflect.Method.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[activemq.jar:5.10.0]
jvm 1    |      at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.10.0]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_101]
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at java.lang.reflect.Method.invoke(Unknown Source)[:1.8.0_101]
jvm 1    |      at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)[wrapper.jar:3.2.3]


> <virtualSelectorCacheBrokerPlugin/> should be able to cache consumers with no selectors
as well
> -----------------------------------------------------------------------------------------------
>
>                 Key: AMQ-4271
>                 URL: https://issues.apache.org/jira/browse/AMQ-4271
>             Project: ActiveMQ
>          Issue Type: Improvement
>    Affects Versions: 5.7.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>             Fix For: 5.9.0
>
>
> With selectorAware=true setting for virtual topics we are checking for consumers (and
their selectors) to detect if the message should be sent to the virtual topic or not. virtualSelectorCacheBrokerPlugin
helps in the case we want to prevent "message loss" for subscribers that goes offline. But
it doesn't work for the consumers that don't have selectors as they are not being cached.
This should be sensible thing to do and allow both consumers with and without selectors to
behave the same in this scenario.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message