-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: hibernate search jms queue not consumed
PostPosted: Mon Jun 27, 2011 1:10 pm 
Newbie

Joined: Mon Jun 27, 2011 12:39 pm
Posts: 3
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


Top
 Profile  
 
 Post subject: Re: hibernate search jms queue not consumed
PostPosted: Tue Jun 28, 2011 6:39 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Seems you are using a Spring + ActiveMQ setup. In particular I don't know anything about the @Service annotation you are using. Have you turned on debug trace and looked at the log?


Top
 Profile  
 
 Post subject: Re: hibernate search jms queue not consumed
PostPosted: Thu Jun 30, 2011 4:34 am 
Newbie

Joined: Mon Jun 27, 2011 12:39 pm
Posts: 3
Hi,
Thanks for your answer. I finally found the problem.
My slave was producing messages in a queue named hibernateSearch, while the consumer was waiting for queue "hibernateSearchQueue", so I changed the physical name of my resource whith: physicalName="hibernateSearchQueue"


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.