bookhuntress
bookhuntress

Reputation: 331

activemq logging of messages enqueued by producer and dequeued by consumer

we're using activemq as message queue of our Java stand-alone application. my problem is that based on the activemq web console, the queue has this certain number of messages enqueued and dequeued. however, based on sysout statements i added in the code, it seems that the application is consuming less than the number of messages displayed on the activemq web console. for example, on the activemq console, no. of messages enqueued and dequeued is around 1800. however, the number of messages dequeued as displayed on console (i increment a counter per message received) is only around 1700.

i really don't know where the approx. 100 messages went. so i'm thinking maybe i'll have some idea if i know how to make activemq log the message enqueued by the producer and dequeued by the consumer. is this possible? if yes, how can this be done?

Upvotes: 1

Views: 2088

Answers (1)

ceposta
ceposta

Reputation: 446

enqueued == numbers of messages put into the queue since the last restart dequeued == number of messages successfully processed by the consumers the difference in the two numbers == number of messages in-flight, usually tracked by the "dispatched" counter. "in-flight" means sent to the consumer, but not yet ack'd.

Upvotes: 1

Related Questions