activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fulko Hew <fulko....@gmail.com>
Subject Re: how to detect end-of-dataset ?
Date Mon, 05 Nov 2012 15:55:12 GMT
On Mon, Nov 5, 2012 at 10:27 AM, Christian Posta
<christian.posta@gmail.com>wrote:

> So looks like destinationName is the 6th element in the "entry" array
>
> Not too familiar with perl, but i bet there are json libs (
> http://search.cpan.org/~makamaka/JSON-2.53/lib/JSON.pm ??) that should
> help
> easily parse these results and navigate the object
>

I already have the info decoded (I didn't provide that example because
I thought you wanted to see the raw info and transactions).


> then you can keep track of which destinations you've received statistics
> for
>

The issue is that I will be periodically querying the broker to get its
'current'
list of queues and their info, so I need to know when the 'end of the list'
is reached.

And since the list of queues can be different during any specific request,
the best I can see is to use a timeout mechanism that assumes that...
if I haven't seen another response message (in a few seconds)
(and that the system wasn't too busy to respond to me...),
that the list should now be considered complete
(ie. I won't be getting any more messages) and so I can perform
my 'correlation activity' on what I had received to-date.

...then sometime later... do the whole thing over again.

if that doesn't help, you can interrogate the broker via jmx to determine
> what destinations are available and do individually like you mentioned. not
> sure there is a way to get a list of destinations via messaging
>

Unfortunately, JMX is not an option for me at the moment.

... snip ...


> On Mon, Nov 5, 2012 at 7:01 AM, Fulko Hew <fulko.hew@gmail.com> wrote:
>
> > This may be a silly question, but only because I'm totally unfamiliar
> > with the MQ world.
> >
> > ...In my previous question, I was trying to use Perl/STOMP to retrieve
> > statistics from the StatisticsPluginBroker in an ActiveMQ world.
> >
> > So naturally one of the items is the queue statistics.
> > Now because I want to retrieve the stats on _all_ queues,
> > I ask for the information using the wild-card approach,
> > (asking for: /queue/ActiveMQ.Statistics.Destination.*)
> > and indeed I receive a sequence of messages, one per queue.
> >
> > But what I need to know is when I've reached the end of the list...
> > when I've received the 'last one', so that I can perform my
> > additional tasks.
> >
> > Is there an MQ concept that can be used to 'bracket' the results?
> >
> > Or is it fundamentally impossible given the 'message orientation'
> > of the StatisticsPluginBroker?
> >
> > Or is there some way (using that broker and STOMP) to retrieve the
> > 'list of queues' and then retrieve the data on each one singly
> > and explicitly?
> >
> > TIA
> > Fulko
>

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