[
https://issues.apache.org/jira/browse/AMQ-6986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512176#comment-16512176
]
Gary Tully commented on AMQ-6986:
---------------------------------
it is by design because the jdbc store does not have an index.
the broker.xml destinations list is a way to persist queues, there is an export
option. but it won't help for dynamic systems.
> Queues/Topics with no pending messages are lost when using
> JDBCPersistenceAdapter
> ---------------------------------------------------------------------------------
>
> Key: AMQ-6986
> URL: https://issues.apache.org/jira/browse/AMQ-6986
> Project: ActiveMQ
> Issue Type: Bug
> Components: JDBC
> Affects Versions: 5.15.3
> Reporter: Davide Del Grande
> Priority: Major
>
> With KahaDB, empty queues (0 pending messages) "survive" broker restarts.
> Instead when using JDBC persistence, they just disappear (while queues with
> pending messages work just fine).
> It also seems that Topics are deleted (not sure about this).
> My cfg is:
> {{<persistenceAdapter>}}
> {{ <jdbcPersistenceAdapter dataDirectory="activemq-data"
> dataSource="#postgres-ds" lockKeepAlivePeriod="5000">}}
> {{ <locker>}}
> {{ <lease-database-locker leaseHolderId="i-03f2b8bfc2ff67a6d"
> lockAcquireSleepInterval="10000"/>}}
> {{ </locker>}}
> {{ </jdbcPersistenceAdapter>}}
> {{</persistenceAdapter>}}
> {{<bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">}}
> {{ <property name="serverName" value="localhost"/>}}
> {{ <property name="databaseName" value="activemq"/>}}
> {{ <property name="portNumber" value="0"/>}}
> {{ <property name="user" value="activemq"/>}}
> {{ <property name="password" value="activemq"/>}}
> {{ <property name="dataSourceName" value="postgres"/>}}
> {{ <property name="initialConnections" value="1"/>}}
> {{<property name="maxConnections" value="10"/>}}
> {{</bean>}}
>
> This is pretty annoying because, at least in my use-case, a monitoring system
> periodically polls queues to see if they are empty or not - and it fails if
> it cannot find the queues that it was polling before broker restart.
> And for topics, this can break the application, too.
>
> I can't understand if this is per-design (is it documented?) or I'm facing
> some bugs.
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)