ActiveMQ Topic Persistence - ActiveMQ restart

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ Topic Persistence - ActiveMQ restart

joesan
Dear users,

I have an ActiveMQ broker that contains a topic in it. I have pre-configured the topic as a start up destination. I have written a producer and a consumer. The following is what I do:

(1) Start ActiveMQ broker
(2) Start my producer. As soon as I do this, my producer starts publishing messages to the pre-configured topic destination. I leave my producer to run and accumulate about 200 messages or so.
(3) I restart my ActiveMQ

As soon as I restart my ActiveMQ, I do not see anymore messages (that got accumulated in the topic before restart) in the admin console. Why is that the messages are lost though they have been persisted to the persistent data store? How do I get my messages in the topic back after ActiveMQ restart
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ Topic Persistence - ActiveMQ restart

bizcenter
you should use durable sbuscription!

You follow these steps
    1. Create a durable topic subscription
    2. Publish some messages to the topic(Qos: set persistent to true)

more to see: http://activemq.apache.org/why-do-i-not-receive-messages-on-my-durable-topic-subscription.html
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ Topic Persistence - ActiveMQ restart

joesan
I figured that out now. But anyways thanks for the post!
Reply | Threaded
Open this post in threaded view
|

Did anyone experience the java.io.SyncFailedException during AMQ use?

DepestBlue
In reply to this post by joesan
Dear all,


Now I'm running activemq 5.6 and found the following exception, did any experience the same problem and fix it?
xxxx | ERROR | KahaDB failed to store to Journal | org.apache.activemq.store.kahadb.MessageDatabase | ActiveMQ Transport: xxx
java.io.SyncFailedException: sync failed
at java.io.FileDescriptor.sync(Native Method)
at org.apache.kahadb.journal.DataFileAppender.processQueue(DataFileAppender.java:367)
at org.apache.kahadb.journal.DataFileAppender$1.run(DataFileAppender.java:188)


It would be much appreciated if any suggestions!


Best regards,
Zhuran
Reply | Threaded
Open this post in threaded view
|

Re: Did anyone experience the java.io.SyncFailedException during AMQ use?

ceposta
Disk problems? What kind of disk, OS and filesystem are you using?


On Mon, May 27, 2013 at 4:22 AM, lzr <[hidden email]> wrote:

> Dear all,
>
>
> Now I'm running activemq 5.6 and found the following exception, did any
> experience the same problem and fix it?
> xxxx | ERROR | KahaDB failed to store to Journal |
> org.apache.activemq.store.kahadb.MessageDatabase | ActiveMQ Transport: xxx
> java.io.SyncFailedException: sync failed
> at java.io.FileDescriptor.sync(Native Method)
> at
> org.apache.kahadb.journal.DataFileAppender.processQueue(DataFileAppender.java:367)
> at
> org.apache.kahadb.journal.DataFileAppender$1.run(DataFileAppender.java:188)
>
>
> It would be much appreciated if any suggestions!
>
>
> Best regards,
> Zhuran




--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta