activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Duplicating Large Messages
Date Tue, 04 Jul 2006 14:15:24 GMT
On 7/4/06, nlif <> wrote:
> Thank you. This was very helpful. I think we now have answers to almost all
> of our concerns. Just one more question, if I may :-)
> I described my motivation as the need to split a single, but very big,
> message, into smaller chunks, just for optimized transfer. However, the need
> is two-fold: In some cases, I do need to send large binary files, for which
> streams are a great solution. But in some (other) cases, I need to send
> messages, which, while not necessarily very large, are comprised of several
> messages. For example: a data file (JMS BytesMessage), along with a command
> object (ObjectMessage or TextMessage if it's an XML) that instructs what to
> do with the data. So my "message" is in fact two JMS messages, that are only
> meaningful together.
> In this case, I may also require something along the lines of an aggregator,
> but I'm not sure the streams are my best choice. While browsing the ActiveMQ
> documentation, which has lately become my favorite pastime :-),


BTW we're always on the lookout for feedback on how we can improve the
website and make it eaiser to navigate.

>  I came
> across the exclusive-consumer and message-groups features. Am I correct in
> considering this as a solution for the second scenario I described? (That is
> - streams for sending very large files, and message-groups for sending
> several separate messages, that belong together logically).

Yes, absolutely right. If you make up some message group header and
add it to your related messages then they are guarrenteed to be
processed by the same consumer (unless the consumer dies). You could
enforce a number of messages being processed atomically using this
feature together with JMS transactions etc.

So just set the JMSXGroupId header to something unique for the related
messages and you should be fine



View raw message