-
1. Re: Read and query HornetQ journal with Java ?
jbertram Feb 26, 2012 9:54 PM (in response to akrambenaissi)1 of 1 people found this helpfulI don't think "querying" the journal directly is feasible. Why not use a message selector? The JMS message selector's syntax is based on a subset of the SQL92 conditional expression syntax.
-
2. Re: Read and query HornetQ journal with Java ?
akrambenaissi Feb 27, 2012 4:55 PM (in response to jbertram)Hi Justin,
A selector will not help, because I want to get messages with timestamp later than a given one. And this given one will vary between queries and clients.
Moreover, my clients will not use JMS directly. They will connect to a webapp that will return only the selected messages given the filter.
So what I will finally do is create a MDB that will consume messages later and put them in database.
Greetings
Akram
-
3. Re: Read and query HornetQ journal with Java ?
clebert.suconic Feb 27, 2012 5:54 PM (in response to akrambenaissi)We have the PrintData tool, and Justin is working on an export Tool to export messages on a XML format.
You can create a Consumer with the filter you want maybe? You can't query the journal like a database after a message system is not a database.
(that approach usually fails really badly with any message system you choose)
-
4. Re: Read and query HornetQ journal with Java ?
jbertram Feb 27, 2012 6:01 PM (in response to akrambenaissi)I'm still not sure why a selector wouldn't work. You can query on JMSTimestamp.
Also, your clients don't necessarily need to use JMS directly. If they are connecting to a webapp then the webapp can use a JMS selector and then return the results to the client in whatever format is appropriate.