activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sateesh <>
Subject Messages are getting lost when sent from Spring
Date Thu, 26 Oct 2006 19:12:52 GMT

HI All,

  I am using Spring2.0 to send messages to a Topic in Active MQ 4.0.2

  I have used Hermes to create a Topic (named ProcessSampleTopic) and my
Spring bean config looks as listed below..

   <bean id="jmsFactory"
        <property name="connectionFactory">
            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL">
    <!-- Spring JMS Template -->
    <bean id="myJmsTemplate"
        <property name="connectionFactory">
            <!-- lets wrap in a pool to avoid creating a connection per send
                <property name="targetConnectionFactory">
                    <ref local="jmsFactory" />
    <bean id="processSampleTopic"
        <constructor-arg index="0" value="ProcessSampleTopic"/> 

  I am using the below code to send and receive a message and i don't get
any message back and also when i check Hermes for messages in the Topic i
don't find any..

           Topic topic =(Topic)appCtxt.getBean("processSampleTopic");
            jmsTemplate.convertAndSend(topic,"This is a Test Message");
            System.out.println("Done sending the message");
            String msg =(String)jmsTemplate.receiveAndConvert(topic);
            System.out.println("Got the message :"+msg);

Pls let me know..


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message