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:05:47 GMT
On Mon, Nov 5, 2012 at 9:21 AM, Christian Posta
<christian.posta@gmail.com>wrote:

> Can you post a snippet of the response you're getting from ActiveMQ?
> It should be in JSON format, and if it is, it shouldn't be too difficult to
> deal with in terms of delimiting objects and determining where you are in
> the object.
>

Since I only have a few queues (from the ActiveMQ examples/transaction,
plus my own for these stats transactions), below is the full transcript.


CONNECT
content-length:0
passcode:manager
login:system

.CONNECTED
heart-beat:0,0
session:ID:localhost.localdomain-57825-1351687937577-3:143
server:ActiveMQ/5.7.0
version:1.0

.
SUBSCRIBE
destination:/queue/statsresults
content-length:0
receipt:
transformation:jms-map-json

.RECEIPT
receipt-id:

.
SEND
destination:/queue/ActiveMQ.Statistics.Destination.*
reply-to:/queue/statsresults
content-length:0
receipt:

.RECEIPT
receipt-id:

.
MESSAGE
message-id:ID:localhost.localdomain-57825-1351687937577-2:1:0:0:176
type:Advisory
transformation:jms-map-json
destination:/queue/statsresults
timestamp:0
expires:0
priority:0

{"map":{"entry":[{"string":"memoryUsage","long":0},{"string":"dequeueCount","long":13},{"string":"inflightCount","long":0},{"string":"messagesCached","long":0},{"string":"averageEnqueueTime","double":11},{"string":["destinationName","queue:\/\/MonitorOrderQueue"]},{"string":"size","long":0},{"string":"memoryPercentUsage","int":0},{"string":"producerCount","long":0},{"string":"consumerCount","long":0},{"string":"minEnqueueTime","double":4},{"string":"maxEnqueueTime","double":25},{"string":"dispatchCount","long":13},{"string":"expiredCount","long":0},{"string":"enqueueCount","long":13},{"string":"memoryLimit","long":1048576}]}}.
MESSAGE
message-id:ID:localhost.localdomain-57825-1351687937577-2:1:0:0:177
type:Advisory
transformation:jms-map-json
destination:/queue/statsresults
timestamp:0
expires:0
priority:0

{"map":{"entry":[{"string":"memoryUsage","long":1024},{"string":"dequeueCount","long":174},{"string":"inflightCount","long":0},{"string":"messagesCached","long":0},{"string":"averageEnqueueTime","double":42.758620689655174},{"string":["destinationName","queue:\/\/statsresults"]},{"string":"size","long":1},{"string":"memoryPercentUsage","int":0},{"string":"producerCount","long":0},{"string":"consumerCount","long":1},{"string":"minEnqueueTime","double":1},{"string":"maxEnqueueTime","double":509},{"string":"dispatchCount","long":174},{"string":"expiredCount","long":0},{"string":"enqueueCount","long":175},{"string":"memoryLimit","long":1048576}]}}.
MESSAGE
message-id:ID:localhost.localdomain-57825-1351687937577-2:1:0:0:178
type:Advisory
transformation:jms-map-json
destination:/queue/statsresults
timestamp:0
expires:0
priority:0

{"map":{"entry":[{"string":"memoryUsage","long":0},{"string":"dequeueCount","long":13},{"string":"inflightCount","long":0},{"string":"messagesCached","long":0},{"string":"averageEnqueueTime","double":2.769230769230769},{"string":["destinationName","queue:\/\/VendorOrderQueue"]},{"string":"size","long":0},{"string":"memoryPercentUsage","int":0},{"string":"producerCount","long":0},{"string":"consumerCount","long":0},{"string":"minEnqueueTime","double":1},{"string":"maxEnqueueTime","double":19},{"string":"dispatchCount","long":13},{"string":"expiredCount","long":0},{"string":"enqueueCount","long":13},{"string":"memoryLimit","long":1048576}]}}.
MESSAGE
message-id:ID:localhost.localdomain-57825-1351687937577-2:1:0:0:179
type:Advisory
transformation:jms-map-json
destination:/queue/statsresults
timestamp:0
expires:0
priority:0

{"map":{"entry":[{"string":"memoryUsage","long":0},{"string":"dequeueCount","long":13},{"string":"inflightCount","long":0},{"string":"messagesCached","long":0},{"string":"averageEnqueueTime","double":10.384615384615385},{"string":["destinationName","queue:\/\/StorageOrderQueue"]},{"string":"size","long":0},{"string":"memoryPercentUsage","int":0},{"string":"producerCount","long":0},{"string":"consumerCount","long":0},{"string":"minEnqueueTime","double":5},{"string":"maxEnqueueTime","double":18},{"string":"dispatchCount","long":13},{"string":"expiredCount","long":0},{"string":"enqueueCount","long":13},{"string":"memoryLimit","long":1048576}]}}.
MESSAGE
message-id:ID:localhost.localdomain-57825-1351687937577-2:1:0:0:180
type:Advisory
transformation:jms-map-json
destination:/queue/statsresults
timestamp:0
expires:0
priority:0

{"map":{"entry":[{"string":"memoryUsage","long":4144},{"string":"dequeueCount","long":0},{"string":"inflightCount","long":0},{"string":"messagesCached","long":0},{"string":"averageEnqueueTime","double":7421.833333333333},{"string":["destinationName","queue:\/\/test"]},{"string":"size","long":4},{"string":"memoryPercentUsage","int":0},{"string":"producerCount","long":0},{"string":"consumerCount","long":0},{"string":"minEnqueueTime","double":10},{"string":"maxEnqueueTime","double":22235},{"string":"dispatchCount","long":0},{"string":"expiredCount","long":0},{"string":"enqueueCount","long":4},{"string":"memoryLimit","long":1048576}]}}.




>
>
> 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
> >
>
>
>
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta
>

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