activemq


Consumer Count / pending Message Count from Queue + ActiveMQ + Java


I have to develop the Utility in Java which will use the ActiveMQ API to get the properties of Queue/Topic to get the No of Consumers / No of Pending Messages and also is there any way I can delete any Message thru Code from Queue ?
I would recommend to use the Statistics Plugin to get the consumer count, pending counts etc.
About deleting/removing any particular message from queue, I would recommend not to do that in a separate program but just let your message consumers handle such messages. That would be more maintainable approach I think.
All the below details are with respect to Queue API of ActiveMQ, you can find similar things for topic as well
No of Pending messages can be found by using getMessages().size()
No of consumers can be found by getConSumers().size()
yes , we can delete messages onto queue from Java code, but we need
MessageReference or the messageId or a suitable message Selector for this to happen, you can have a look at official
documentation of removeMessage(...) and
removeMatchingMessages(...) here
hope this helps!
Good luck!

Related Links

I can't connect 8161/admin when activeMQ replicated levelDB with zookeeper
WSO2 - DAS consuming MQTT messages
How to recover ActiveMQ from full KahaDb persistence store?
How to configure the default ActiveMQ in tomEE
Ruby Stomp Gem #publish seems to truncate messages to 256 characters?
ActiveMQ: how can I deliver all messages in a queue to many consumers?
ActiveMQ broker redelivery vs consumer redelivery
Unable to define correct authorization rules… topic://ActiveMQ.Advisory.Producer.Queue.Q1
Spring web-socket message size
schedule moving of messages from activemq DLQ to another queue in ActiveMQ
Use ActiveMQ 5 and IBM MQ 8 in the same application
ActiveMQ performance for producing persistent text messages
active mq and spring jmstemplate how to properly shut down
How provide reliability of ActiveMQ broker?
XA transaction across two separate resource managers/XAResource's
How can I configure a static network of TomEE embedded ActiveMQ brokers so that clients can communicate?

Categories

HOME
hpoo
matrix
keyboard
functional-programming
yahoo-weather-api
yii
qc
softlayer
histogram
tabs
elisp
supercollider
firebase-database
lc3
migrate
xades4j
cname
orc
jpa-2.0
supervisord
jaspersoft-studio
cloudsim
nullreferenceexception
adobe-illustrator
bluemix-mobile-services
error-logging
sharedpreferences
maven-surefire-plugin
substring
vuforia
beego
network-analysis
javax.persistence
tilemill
d3.js-v4
vcenter
john-the-ripper
image-optimization
gnu-classpath
cmis
spring-rabbitmq
amazon-kms
pdfminer
netstat
redgate
jade4j
strapi
sspi
assemblies
python-jira
elasticsearch-aggregation
common-table-expression
deployd
photoswipe
mura
predicates
.when
dynamics-crm-4
wildfly-9
ogg
researchkit
metabase
wininet
ftp-client
meld
rails-engines
fdt
gwt-syncproxy
flush
certificate-authority
flask-security
myfaces
enunciate
cryptojs
chicagoboss
wso2ml
supersocket.net
abstract-factory
kotlin-android-extensions
mutators
nhibernate-criteria
rebar
adwords-apiv201402
siena
webautomation
distributed-r
.htpasswd
iosched
particle-swarm
pbkdf2
yii-booster
flv
sly-scroller
spiral
reentrancy
android-authenticator
story
clearinterval
cakeyframeanimation
hardcode
expression-web
representation
cewolf
rtd
android-input-method
oracle-pro-c
eventaggregator
iphone-sdk-3.1.3

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App