activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac" <>
Subject Re: ActiveMQ Persistence Question / JDBC or Hibernate
Date Thu, 08 Jan 2009 09:32:03 GMT
Hi Davis,
first note that ActiveMQ persistence mechanism is used to store messages
"inside" the broker so that messages that are not consumed are not lost in
case of a broker shutdown. So if you want to change that internal mechanism
you should implement your own jdbc persistent adapter. Take a look at these
classes for some starting points

On the other hand, if you wish to create a consumer that will consume and
save the messages in the database for some other application to use them,
you should use Camel. There are variety of components you can use for that,
such as sql, jdbc, hibernate or iBatis ( and you shold use one that
fits you application the best.


Dejan Bosanac

Open Source Integration -
ActiveMQ in Action -
Blog -

On Tue, Jan 6, 2009 at 6:43 PM, davis <> wrote:

> Hi,
> I have defined a single ObjectMessage type for a queue, and I am using
> journaling with JDBC persistence to Oracle -- everything is working fine.
> However, the schema activemq creates auto-magically stores the message as a
> BLOB.  I can understand why, but I would like to change this.
> I would like to store the message in a custom table.  The
> ObjectMessage#getObject() returns a simple bean I created with get/set for
> String/int.  I would like to persist this in a custom table so it is
> available for querying against (as opposed to a BLOB in ACTIVEMQ_MSGS.MSG)
> I am guessing I'll probably have to use Hibernate & Camel to achieve this?
> Any recommendations on how to proceed?
> Thanks in advance,
> Davis
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message