Hello,
I've got a problem with my jms queue, which doesn't seem to be consumed.
My persistence directory defined with jms.amq.broker.persistant.directory contains a lot of "data-queue-data-XX" files, sent by others applications.
The queue seems to be fulled, and stuck.
Here is my jms context definition :
Code:
<amq:broker brokerName="${jms.amq.broker.name}">
<amq:managementContext>
<amq:managementContext createConnector="false" />
</amq:managementContext>
<amq:persistenceAdapter>
<amq:kahaPersistenceAdapter directory="${jms.amq.broker.persistant.directory}"
maxDataFileLength="${jms.amq.broker.persistant.maxlength}" />
</amq:persistenceAdapter>
<amq:transportConnectors>
<amq:transportConnector uri="${jms.amq.broker.transport.connector.uri}" />
</amq:transportConnectors>
</amq:broker>
<jee:jndi-lookup id="jmsConnectionFactory" jndi-name="java:comp/env/jms/ConnectionFactory" />
<jee:jndi-lookup id="jmsHibernateSearchQueue" jndi-name="java:comp/env/queue/hibernatesearch" />
<bean id="jmsContainer" class="org.springframework.jms.listener.SimpleMessageListenerContainer"
depends-on="brokerManager">
<property name="connectionFactory" ref="jmsConnectionFactory" />
<property name="destination" ref="jmsHibernateSearchQueue" />
<property name="messageListener" ref="simpleJMSHibernateSearchController" />
<property name="concurrentConsumers" value="${hibernate.jms.container.concurrent.consumers}" /> <!-- 1 -->
</bean>
Resource in my tomcat context:
Quote:
<Resource name="jms/ConnectionFactory" auth="Container" type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS Connection Factory"
factory="org.apache.activemq.jndi.JNDIReferenceFactory" brokerURL="tcp://myserver:11111?trace=true" brokerName="hibernateSearchBroker" />
<Resource name="queue/hibernatesearch" auth="Container" type="org.apache.activemq.command.ActiveMQQueue" description="Hibernate search queue"
factory="org.apache.activemq.jndi.JNDIReferenceFactory" physicalName="hibernateSearchQueue" />
my SimpleJMSHibernateSearchController bean is pretty simple:
Code:
@Service
public final class SimpleJMSHibernateSearchController extends AbstractJMSHibernateSearchController {
private final SessionFactory sessionFactory;
@Inject
protected SimpleJMSHibernateSearchController(final SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
@Override
protected void cleanSessionIfNeeded(final Session session) {
}
@Override
protected Session getSession() {
return SessionFactoryUtils.getSession(sessionFactory, true);
}
}
and finally my slave configuration:
Quote:
## Backend configuration
hibernate.search.worker.backend=jms
hibernate.search.worker.jms.connection_factory=QueueConnectionFactory
hibernate.search.worker.jms.queue=queue/hibernatesearch
#optional jndi configuration (check your JMS provider for more information)
hibernate.search.worker.jndi.java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
hibernate.search.worker.jndi.java.naming.provider.url=tcp://flavius:61616
hibernate.search.worker.jndi.queue.hibernatesearch=queue/hibernatesearch
Queue isn't proceed, and my index isn't updated.
Any ideas or suggestions ?
Thanks for you help