Announcement Announcement Module
Collapse
No announcement yet.
ActiveMQ Spring - Persistence Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ActiveMQ Spring - Persistence

    Hi,

    I am using Spring in conjunction with activemq. What happens when I turn activemq off in the middle of sending messages is that messages stop being published to the topic. This is understandable, however, the functionality that i am looking for is for the messages to be written to a file via persistence and then when the connection is re-established, the messages that were written to the file are sent to the consumer as well as the stream i am sending
    I have the following code which allows me to send messages via activemq.

    <bean id="myTopic" class="org.apache.activemq.command.ActiveMQTopic">
    <property name="physicalName" value="feed.topic" />
    </bean>

    <bean id="myConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFacto ry">
    <property name="brokerURL" value="failover:tcp://localhost:61616" />
    </bean>

    <bean id="myJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory" ref="myConnectionFactory" />
    <property name="defaultDestination" ref="myTopic" />

    </bean>

    <bean id="sender" class="com.feed.publish.PublishMessages">
    <property name="jmsTemplate" ref="myJmsTemplate" />
    </bean>

    I somehow need to setup the persistance side of things, but i am unsure exactly how to do this? Does anyone no how or what modifications need to be done in my spring config file to allow this functionality?

    Thanks
    Thanks

  • #2
    Sorry for not getting to this sooner. We are in the process of moving to StackOverflow for our forums.

    This question is probably a better candidate for StackOverflow, perhaps against the #spring-jms tag.

    If you do post it there, please reply here with the link.

    Thanks!

    Comment

    Working...
    X