Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8796123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:33:00+00:00 2026-06-13T23:33:00+00:00

<bean id=myTopic class=org.apache.activemq.command.ActiveMQTopic> <property name=physicalName value=feed.topic /> </bean> <bean id=myConnectionFactory class=org.apache.activemq.ActiveMQConnectionFactory> <property name=brokerURL value=failover:tcp://localhost:61616

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

<bean id="myConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
    <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 have the above set up using the spring framework that allows me to publish messages to a queue. However, if the activemq instance is terminated mid process, I would like it to write to disk/file the messages until a connection can be reestablished. I have found sample code off of the website of activemq however I am unsure how I integrate this in to my current setup

<amq:broker useJmx="true" persistent="true" brokerName="localhost">
    <amq:persistenceAdapter>
        <amq:kahaPersistenceAdapter directory="activemq-data"
            maxDataFileLength="33554432" />
    </amq:persistenceAdapter>
    <amq:transportConnectors>
        <amq:transportConnector name="vm" uri="vm://localhost" />
    </amq:transportConnectors>
</amq:broker>

Can someone please tell me how I go about merging these two styles? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:33:01+00:00Added an answer on June 13, 2026 at 11:33 pm

    the AMQ persistenceAdapter configuration is to allow the AMQ Broker to persist messages to disk, not the client. If the broker connection is terminated, your client code should catch the exception, write the messages to disk and provide a means to replay them at a later time.

    along these lines, I generally use Apache Camel’s exception handling and file components to handle these type of scenarios…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

bean id=foo class=com.ems.samples.spring.Foo property name=bar ref=bar/ /bean bean id=bar class=com.ems.samples.spring.Bar public class Foo {
We can put whole bean in sessionScope. <managed-bean> <managed-bean-name>managedBeanList</managed-bean-name> <managed-bean-class>com.org.SomeMBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> But is there
Have two bean definitions: file a.xml <bean id=A class=com.A> <property name=bClass ref=B/> </bean> file
I have a bean: <bean id=BasketLogic class=efco.logic.EfcoBasketLogic autowire=byType> <property name=documentLogic ref=DocumentLogic /> <property name=stateAccess
Error creating bean with name 'sessionFactory' defined in class path resource [ApplicationContext.xml]: Invocation of
I have defined a bean <logic:iterate id=keyRecDetail name=KeyRecInquiryForm property=keyRecDetailList indexId=rowNum> Now i want to
I have a Bean that looks like this Class Person{ private String name; private
I have a command bean ( FooList ) which has a property which is
I have a managed bean (SessionScope as follow) @ManagedBean(name=login) @SessionScoped public class Login implements
I have a hibernate bean called Property which has a type and a value.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.