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

Robbie Gemmell edited comment on AMQ-7350 at 11/25/19 2:48 PM:
---------------------------------------------------------------

There is some additional log details and summary in the nabble thread which, at 
least in my case, did not make it through to the mailing list:

http://activemq.2283324.n4.nabble.com/offline-Durable-Topic-Subscribers-issue-in-activemq-5-15-8-tp4753263p4753376.html
{noformat}
I also wiped out my persistence today. Started the broker and then restarted 
the broker.

I again ended up in the same issue. Below are the actual debug logs wrt to the 
diagram attached in the original ticket

2019-11-15 13:55:39,664 | DEBUG | Restoring durable subscription: 
SubscriptionInfo {subscribedDestination = topic://Hello.V1, destination = 
topic://Hello.V1, clientId = broker-name-2-world_world, subscriptionName = 
hello, selector = null, noLocal = false} | 
org.apache.activemq.broker.region.TopicRegion | main
2019-11-15 13:55:39,668 | DEBUG | Restoring durable subscription: 
SubscriptionInfo {subscribedDestination = topic://World.V1, destination = 
topic://World.V1, clientId = broker-name-2-world_world, subscriptionName = 
world, selector = null, noLocal = false} | 
org.apache.activemq.broker.region.TopicRegion | main
2019-11-15 13:55:40,194 | DEBUG | Setting up new connection id: 
ID:MY_SERVER-40009-1573807342637-4:169, address: tcp://MY_IP:59706, info: 
ConnectionInfo {commandId = 1, responseRequired = true, connectionId = 
ID:MY_SERVER-40009-1573807342637-4:169, clientId = broker-name-2-world_world, 
clientIp = null, userName = MY_USERNAME, password = *****, brokerPath = null, 
brokerMasterConnector = false, manageable = true, clientMaster = true, 
faultTolerant = false, failoverReconnect = false} | 
org.apache.activemq.broker.TransportConnection | ActiveMQ Transport: 
tcp:///MY_IP:PORT@61616
2019-11-15 13:55:40,261 | DEBUG | Deactivating keepActive=true, 
DurableTopicSubscription-broker-name-2-world:world, 
id=ID:MY_SERVER-40009-1573807342637-4:169:1:1, active=false, destinations=1, 
total=0, pending=0, dispatched=0, inflight=0, prefetchExtension=0 | 
org.apache.activemq.broker.region.DurableTopicSubscription | ActiveMQ 
Transport: tcp:///MY_IP:PORT@61616
2019-11-15 13:55:40,261 | DEBUG | Activating 
DurableTopicSubscription-broker-name-2-world:world, 
id=ID:MY_SERVER-40009-1573807342637-4:169:1:1, active=false, destinations=1, 
total=0, pending=0, dispatched=0, inflight=0, prefetchExtension=0 | 
org.apache.activemq.broker.region.DurableTopicSubscription | ActiveMQ 
Transport: tcp:///MY_IP:PORT@61616
2019-11-15 13:55:40,262 | DEBUG | Unregistering MBean 
org.apache.activemq:type=Broker,brokerName=MY_FRONTEND,destinationType=Topic,destinationName=World.V1,endpoint=Consumer,clientId=broker-name-2-world,consumerId=Durable(broker-name-2-world_world)
 | org.apache.activemq.broker.jmx.ManagementContext | ActiveMQ Transport: 
tcp:///MY_IP:PORT@61616


Summary :
It restored 2 durable subscriber even though there is just one for that topic.
Sets up connection, deactivate correct subscriber,activate correct subscriber

No more information for the wrongly mapped offline subscriber
{noformat}



was (Author: gemmellr):
There is some additional log details and summary in the nabble thread which, at 
least in my case, did not make it through to the mailing list:

http://activemq.2283324.n4.nabble.com/offline-Durable-Topic-Subscribers-issue-in-activemq-5-15-8-tp4753263p4753376.html
{quote}
I also wiped out my persistence today. Started the broker and then restarted 
the broker.

I again ended up in the same issue. Below are the actual debug logs wrt to the 
diagram attached in the original ticket

2019-11-15 13:55:39,664 | DEBUG | Restoring durable subscription: 
SubscriptionInfo {subscribedDestination = topic://Hello.V1, destination = 
topic://Hello.V1, clientId = broker-name-2-world_world, subscriptionName = 
hello, selector = null, noLocal = false} | 
org.apache.activemq.broker.region.TopicRegion | main
2019-11-15 13:55:39,668 | DEBUG | Restoring durable subscription: 
SubscriptionInfo {subscribedDestination = topic://World.V1, destination = 
topic://World.V1, clientId = broker-name-2-world_world, subscriptionName = 
world, selector = null, noLocal = false} | 
org.apache.activemq.broker.region.TopicRegion | main
2019-11-15 13:55:40,194 | DEBUG | Setting up new connection id: 
ID:MY_SERVER-40009-1573807342637-4:169, address: tcp://MY_IP:59706, info: 
ConnectionInfo {commandId = 1, responseRequired = true, connectionId = 
ID:MY_SERVER-40009-1573807342637-4:169, clientId = broker-name-2-world_world, 
clientIp = null, userName = MY_USERNAME, password = *****, brokerPath = null, 
brokerMasterConnector = false, manageable = true, clientMaster = true, 
faultTolerant = false, failoverReconnect = false} | 
org.apache.activemq.broker.TransportConnection | ActiveMQ Transport: 
tcp:///MY_IP:PORT@61616
2019-11-15 13:55:40,261 | DEBUG | Deactivating keepActive=true, 
DurableTopicSubscription-broker-name-2-world:world, 
id=ID:MY_SERVER-40009-1573807342637-4:169:1:1, active=false, destinations=1, 
total=0, pending=0, dispatched=0, inflight=0, prefetchExtension=0 | 
org.apache.activemq.broker.region.DurableTopicSubscription | ActiveMQ 
Transport: tcp:///MY_IP:PORT@61616
2019-11-15 13:55:40,261 | DEBUG | Activating 
DurableTopicSubscription-broker-name-2-world:world, 
id=ID:MY_SERVER-40009-1573807342637-4:169:1:1, active=false, destinations=1, 
total=0, pending=0, dispatched=0, inflight=0, prefetchExtension=0 | 
org.apache.activemq.broker.region.DurableTopicSubscription | ActiveMQ 
Transport: tcp:///MY_IP:PORT@61616
2019-11-15 13:55:40,262 | DEBUG | Unregistering MBean 
org.apache.activemq:type=Broker,brokerName=MY_FRONTEND,destinationType=Topic,destinationName=World.V1,endpoint=Consumer,clientId=broker-name-2-world,consumerId=Durable(broker-name-2-world_world)
 | org.apache.activemq.broker.jmx.ManagementContext | ActiveMQ Transport: 
tcp:///MY_IP:PORT@61616


Summary :
It restored 2 durable subscriber even though there is just one for that topic.
Sets up connection, deactivate correct subscriber,activate correct subscriber

No more information for the wrongly mapped offline subscriber
{quote}


> Inconsistency in Offline Durable Topic Subscribers
> --------------------------------------------------
>
>                 Key: AMQ-7350
>                 URL: https://issues.apache.org/jira/browse/AMQ-7350
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: AMQP
>    Affects Versions: 5.15.10
>            Reporter: Ashish
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>         Attachments: offline_topic_durable_subscriber.png
>
>
> Hello All, 
>  * I have a issue with my activemq setup with *durable subscription*. 
>  * My setup includes a broker with topics and the backend that durably 
> subscribes to these topics.
>  * Random mapping of durable subscribers happens on each restart. In order to 
> fix it, I always have to wipe the persistence
>  * All the topics are created via activemq.xml
>  * With the usage of kahadb/mkahadb, I want to enable persistence as well. In 
> doing so, after the restart of my broker i get inconsistency in my offline 
> durable topic susbcribers.
> I am also attaching the config used by me. As well as an image to describe 
> the issue.
>  Config with kahadb
> {code:java}
> <beans
>     xmlns="http://www.springframework.org/schema/beans";
>     xmlns:amq="http://activemq.apache.org/schema/core";
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>     xsi:schemaLocation="http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd
>                       http://activemq.apache.org/schema/core 
> http://activemq.apache.org/schema/core/activemq-core.xsd";>
>   <bean 
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>     <property name="locations">
>       <value>file:${activemq.conf}/credentials.properties</value>
>     </property>
>   </bean>
>   <broker xmlns="http://activemq.apache.org/schema/core"; 
> brokerName="MQ-MY-BROKER-NAME" dataDirectory="${activemq.data}" 
> schedulerSupport="false" persistent="true">
>     <destinations>
>     <topic physicalName="Hello.V3"/>
>     <topic physicalName="Hello.V2"/>
>     <topic physicalName="Hello.V1"/>
>   </destinations>
>     <destinationPolicy>
>       <policyMap>
>         <policyEntries>
>           <policyEntry topic=">" producerFlowControl="true">
>             <pendingMessageLimitStrategy>
>               <constantPendingMessageLimitStrategy limit="1000"/>
>             </pendingMessageLimitStrategy>
>           </policyEntry>
>           <policyEntry queue=">" producerFlowControl="true" 
> memoryLimit="20mb">
>             <deadLetterStrategy>
>               <individualDeadLetterStrategy queueSuffix=".DLQ" 
> useQueueForQueueMessages="true"/>
>             </deadLetterStrategy>
>           </policyEntry>
>         </policyEntries>
>       </policyMap>
>     </destinationPolicy>
>     <managementContext>
>       <managementContext createConnector="true" connectorPort="1199"/>
>     </managementContext>
>     
>     <persistenceAdapter>
>       <kahaDB directory="${activemq.data}" journalMaxFileLength="32mb"/>
>     </persistenceAdapter>
>     <!-- Resource limits for triggering producer flow control -->
>     <systemUsage>
>       <systemUsage>
>         <memoryUsage>
>           <memoryUsage percentOfJvmHeap="70"/>
>         </memoryUsage>
>         <storeUsage>
>           <storeUsage limit="10 gb"/>
>         </storeUsage>
>         <tempUsage>
>           <tempUsage limit="1 gb"/>
>         </tempUsage>
>       </systemUsage>
>     </systemUsage>
>     <!-- DOS protection: limit concurrent connections to 1000 and frame size 
> to 100MB -->
>     <transportConnectors>
>       <transportConnector name="openwire" 
> uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"/>
>       <transportConnector name="stomp" 
> uri="stomp://0.0.0.0:61612?maximumConnections=1000&amp;transport.closeAsync=false&amp;connectionTimeout=120000&amp;wireformat.maxFrameSize=104857600"/>
>     </transportConnectors>
>     <!-- destroy the spring context on shutdown to stop jetty and camel -->
>     <shutdownHooks>
>       <bean xmlns="http://www.springframework.org/schema/beans"; 
> class="org.apache.activemq.hooks.SpringContextHook" />
>     </shutdownHooks>
>   </broker>
>   <!-- Enable web consoles, REST and Ajax APIs and demos -->
>   <import resource="jetty.xml"/>
> </beans>
> {code}
> Config with mkahadb
> {code:java}
> <beans
>     xmlns="http://www.springframework.org/schema/beans";
>     xmlns:amq="http://activemq.apache.org/schema/core";
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>     xsi:schemaLocation="http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd
>                       http://activemq.apache.org/schema/core 
> http://activemq.apache.org/schema/core/activemq-core.xsd";>
>   <bean 
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>     <property name="locations">
>       <value>file:${activemq.conf}/credentials.properties</value>
>     </property>
>   </bean>
>   <broker xmlns="http://activemq.apache.org/schema/core"; 
> brokerName="MQ-MY-BROKER-NAME" dataDirectory="${activemq.data}" 
> schedulerSupport="false" persistent="true">
>     <destinations>
>     <topic physicalName="Hello.V3"/>
>     <topic physicalName="Hello.V2"/>
>     <topic physicalName="Hello.V1"/>
>   </destinations>
>     <destinationPolicy>
>       <policyMap>
>         <policyEntries>
>           <policyEntry topic=">" producerFlowControl="true">
>             <pendingMessageLimitStrategy>
>               <constantPendingMessageLimitStrategy limit="1000"/>
>             </pendingMessageLimitStrategy>
>           </policyEntry>
>           <policyEntry queue=">" producerFlowControl="true" 
> memoryLimit="20mb">
>             <deadLetterStrategy>
>               <individualDeadLetterStrategy queueSuffix=".DLQ" 
> useQueueForQueueMessages="true"/>
>             </deadLetterStrategy>
>           </policyEntry>
>         </policyEntries>
>       </policyMap>
>     </destinationPolicy>
>     <managementContext>
>       <managementContext createConnector="true" connectorPort="1199"/>
>     </managementContext>
>     
>     <persistenceAdapter>
>       <mKahaDB directory="${activemq.data}/mkahadb">
>         <filteredPersistenceAdapters>
>           <filteredKahaDB perDestination="true">
>             <persistenceAdapter>
>               <kahaDB ignoreMissingJournalfiles="false" 
> checkForCorruptJournalFiles="true" checksumJournalFiles="true"/>
>             </persistenceAdapter>
>           </filteredKahaDB>
>         </filteredPersistenceAdapters>
>       </mKahaDB>
>     </persistenceAdapter>
>     <!-- Resource limits for triggering producer flow control -->
>     <systemUsage>
>       <systemUsage>
>         <memoryUsage>
>           <memoryUsage percentOfJvmHeap="70"/>
>         </memoryUsage>
>         <storeUsage>
>           <storeUsage limit="10 gb"/>
>         </storeUsage>
>         <tempUsage>
>           <tempUsage limit="1 gb"/>
>         </tempUsage>
>       </systemUsage>
>     </systemUsage>
>     <!-- DOS protection: limit concurrent connections to 1000 and frame size 
> to 100MB -->
>     <transportConnectors>
>       <transportConnector name="openwire" 
> uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"/>
>       <transportConnector name="stomp" 
> uri="stomp://0.0.0.0:61612?maximumConnections=1000&amp;transport.closeAsync=false&amp;connectionTimeout=120000&amp;wireformat.maxFrameSize=104857600"/>
>     </transportConnectors>
>     <!-- destroy the spring context on shutdown to stop jetty and camel -->
>     <shutdownHooks>
>       <bean xmlns="http://www.springframework.org/schema/beans"; 
> class="org.apache.activemq.hooks.SpringContextHook" />
>     </shutdownHooks>
>   </broker>
>   <!-- Enable web consoles, REST and Ajax APIs and demos -->
>   <import resource="jetty.xml"/>
> </beans>
> {code}
>  
> Activemq community forum link : 
> [http://activemq.2283324.n4.nabble.com/offline-Durable-Topic-Subscribers-issue-in-activemq-5-15-8-td4753263.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to