activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: Reorder of messages
Date Fri, 11 Jan 2013 15:44:14 GMT
In addition, using a SQL92 selector on a message header property I define
might yield better performance?
>From the documentation, it seems that I might not be able to construct a
query to get what I am after, since it seems it must boil down to a boolean
result.  And the selector would still have to look at each message (just not
each message body), so it seems the issues with tweaking the page size still

The critical thing I am after is the ability to consume a record off a
queue/topic by a minimum value existing in a message.  The minimum is the
minimum of the group of messages currently on the queue.

An example:

Messages on BindBookQueue
*BookID                       Title                         Duration to
Publish Date*
978-3-16-148410-0      Wizard of Oz             7746
934-5-17-376890-3      Peter Rabbit              6475
213-3-19-786345-6      Harry Potter              2190
456-3-44-148410-9      Superman                 0456
978-7-78-435672-7      Atlas Shrugged          9986
978-4-99-761123-0      1984                        8948
321-7-22-567889-1      Brave New World        1784

So when a process becomes available to bind a book I want that process to
consume the message from the 
BindBookQueue with the lowest Duration to Publish Date (in this case:

That is the essence of what I am after.  Of course, this type of thing can
be done with a RDBMS, but I really don't want to add another component into
the mix unless I have to. 
It would be great to figure out a way to use ActiveMQ / JMX to achieve this
goal, as I think it is much simpler overall solution.

I would think this type of use case is somewhat common, but  perhaps I'm
wrong about that.

Any advice / insight is highly appreciated.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message