Using ActiveMQ in Grails through JMS plugin I cannot figure how to set KahaDb persistence properties.
Tried something like:
amq.broker(useJmx: true, persistent: true) {
amq.transportConnectors() {
amq.transportConnector(uri: "tcp://0.0.0.0:61616")
}
amq.persistenceAdapter() {
amq.kahaDB(directory:${application.config.grails.moviesxd.activemq.kahadb},
checksumJournalFiles:true,
checkForCorruptJournalFiles:true,
ignoreMissingJournalfiles:true)
}
}
But i get
groovy.lang.GroovyRuntimeException: Namespace prefix: kahadb is not bound to a URI
Seems like kahadb prefix is not recognized but i cannot find documentation anywhere on how to do this.
You're just missing the equivalent of
xmlns:amq='http://activemq.apache.org/schema/core'
which would be
xmlns amq:'http://activemq.apache.org/schema/core'
(see the reference docs for more info - search for "Using Spring Namespaces")
so the whole conversion would be
import org.springframework.jms.connection.SingleConnectionFactory
xmlns amq:'http://activemq.apache.org/schema/core'
amq.broker(useJmx: true, persistent: true) {
amq.transportConnectors {
amq.transportConnector(uri: 'tcp://0.0.0.0:61616')
}
amq.persistenceAdapter {
amq.kahaDB(directory: application.config.grails.moviesxd.activemq.kahadb,
checksumJournalFiles: true,
checkForCorruptJournalFiles: true,
ignoreMissingJournalfiles: true)
}
}
amq.connectionFactory(id: 'amqConnectionFactory', brokerURL: 'vm://localhost')
jmsConnectionFactory(SingleConnectionFactory, ref('amqConnectionFactory'))
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments