-
Nov 6th, 2012, 01:38 PM
#1
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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules