21 May 2010

50% Off ActiveMQ In Action!



The ActiveMQ In Action book has made available a new early access release before going into final review and copy editing. All 14 chapters are included in this MEAP release.

For a limited time you can get the definitive book on ActiveMQ at a 50% discount! Just use the coupon code *activemq50* at the time of checkout. Hurry and get this discounted price while it lasts because this offer expires on Monday, May 31, 2010.

I want to purchase ActiveMQ in Action today!

8 comments:

  1. Congrats! I just download the latest release. Great job!

    ReplyDelete
  2. Hi Bruce,

    In our project, we have configured Mysql to be used in place of ActiveMQ's KahaDB by configuring the ActiveMQ's config file. Now, we have to store all the info for all the topics, queues, and passed messages etc. in mysql. How can we do that. Do we have to do all that through our java code or are there any configurations available which can be done at the Activemq side.

    Many thanks,
    Kshitiz Garg

    ReplyDelete
  3. @Kshitiz, You stated that you have already replaced the KahaDB persistence with MySQL persistence via the activemq.xml file. So I'm confused as to why you are asking me how to make this change.

    You can configure MySQL as the persistence for ActiveMQ using either journaling or no journaling. Both styles are outlined here and an example is provided:

    http://activemq.apache.org/persistence.html

    Bruce

    ReplyDelete
  4. @Bruce,

    It seems to me that ActiveMQ deletes those messages of the topic which are delivered to the consumer, but we have to save some few "important" messages irrespective of their delivery status, so our doubt is actually about the process to achieve that.

    Sorry being unable to explain that fully :)

    Thanks,
    Kshitiz

    ReplyDelete
  5. @Kshitiz, OK, now I understand. When ActiveMQ delivers a message to all the subscriptions on a given destination, that message is deleted from the broker. The best way to hold a copy of messages is to use either ActiveMQ's mirrored queues or virtual topics:

    http://activemq.apache.org/mirrored-queues.html

    http://activemq.apache.org/virtual-destinations.html

    Hope that helps.

    Bruce

    ReplyDelete
  6. Thanks Bruce,

    Do we have some example app or code for this approach, i mean using virtual destinations or mirrored queues to save all the topic/queue/passed message info to an external db like mysql.

    Actually am a newbie to activemq and time is less -)

    Thanks again for the quick replies,
    Kshitiz

    ReplyDelete
  7. @Kshitiz, Well, you could look at the tests for mirrored queues and virtual topics (composite queues) for examples of how to use them:

    http://fisheye6.atlassian.com/browse/activemq/tags/activemq-5.4.0/activemq-core/src/test/java/org/apache/activemq/broker/virtual

    With mirrored queues, ActiveMQ will save a copy of every message that is sent to a given destination into a different destination. Those messages are then just sitting there. Then it would be up to you to decide how to use those copies of the messages. My guess would be that you could write an application to handle them. I'm not sure if you want to consume them from the mirrored destination, process them and decide which ones to save into a different database table or what. That is up to you.

    Bruce

    ReplyDelete
  8. Thanks Bruce,

    I will certainly try that :)

    Kshitiz

    ReplyDelete