zk topic spring

asked 2014-09-02 23:24:24 +0800

lsilvapina gravatar image lsilvapina


I have a project ZK - Spring - Hibernate, and I have a Sonic topic configurated in my application-context just like this

<bean id="sonicConnectionFactoryAlertasTasa" class="progress.message.jclient.ConnectionFactory" p:faulttolerant="true" p:brokerurl="tcp://xxx.xxx.xxx.xxx:xxx" p:brokerport="xxx" p:defaultuser="xxx" p:defaultpassword="xxx"> </bean>

<bean id="jmsCachingConnectionFactoryAlertasTasa" class="org.springframework.jms.connection.CachingConnectionFactory">
    <property name="targetConnectionFactory" ref="sonicConnectionFactoryAlertasTasa" />

<bean id="myMessageListenerAlertasTasa" class="cl.citymovil.co3.core.controller.AlertaJmsListener"  />

<bean id="jmsContainerAlertasTasa" class="org.springframework.jms.listener.DefaultMessageListenerContainer" >
    <property name="connectionFactory" ref="jmsCachingConnectionFactoryAlertasTasa"/>
    <property name="pubSubDomain" value="true" />
    <property name="concurrency" value="1" />
    <property name="destinationName" value="co3.alertasTasacoop"/>
    <property name="messageListener" ref="myMessageListenerAlertasTasa" />

Now, I´m trying to put a message in this topic, but I can´t find a way to do this. I guess that just like the class DefaultMessageListenerContainer is a listener, there shuld be another class DefaultMessage"Talking"Container or something to put a message in topic.

The other problem I have is as follow: I use the EventQueue strategic to publish and subscribe messages in ZK internal topics, but I only can use the lookup with EventQueues.APPLICATION scope (EventQueue<event> eq = EventQueues.lookup("co3.alertasTasacoop", EventQueues.APPLICATION, true)), but when I tried to use EventQueues.GROUP scope, the application show the message "Execution of JMS message listener failed, and no ErrorHandler has been set.: java.lang.IllegalStateException: Execution required"

Can you help me please?

delete flag offensive retag edit


your first question seems to be a spring problem, this is a ZK forum. I am sure the spring website offers this information. in spring usually the JmsTemplate can be used to send a message http://www.springbyexample.org/examples/simple-spring-jms.html

cor3000 ( 2014-09-03 02:35:31 +0800 )edit

about your other question, are you using eventqueues, do you have more details about that? (e.g. a stacktrace or some code snippet showing the line where the error occurs) How does EventQueues lookup end up in an error concerning JMS?

cor3000 ( 2014-09-03 02:39:17 +0800 )edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2014-09-02 23:24:24 +0800

Seen: 9 times

Last updated: Sep 02 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More