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

ActiveMQ 5.5: Not able to get the DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY value
How do I specify the JMX port for an embedded activemq instance?
How do I ensure a topic is removed from an ActiveMQ broker
Why would I use Apache ServiceMix over just ActiveMQ
How to set the ActiveMQ redeliveryPolicy on a queue?
Apache Camel inOut routes, out exchange marshaling/unmarshaling with jaxb
STOMP Protocol - Session ID Questions
What solution should I use for this webapp with websockets. ActiveMQ?
NIO disadvantages in ActiveMQ
How can I programatically purge an ActiveMQ queue using the Apache.NMS API?
Using Camel to transparently log messages from queue
ActiveMQ and JMS : Basic steps for novice
URL Encoding a Camel Exchange Body
Where can I download ActiveMQ Source Distributions?
activemq embedded broker
How to debug ActiveMQ client?

Categories

HOME
automapper
focus
kendo-dropdown
bots
key
swi-prolog
activex
hid
tcsh
odata
moodle-api
javafx-8
responsive-design
tfs2010
roku
xades4j
erd
cname
business-intelligence
mailmerge
sslhandshakeexception
outlook-restapi
nest-api
codefluent
jitsi
neo4j.rb
web-analytics
acl
intel
react-dnd
fstar
hevc
history.js
boolean-logic
credit-card
phpstorm-2016.1
john-the-ripper
actframework
universal
gsp
devtools
autoencoder
cups
numerics
extbase
haar-classifier
spooler
autorelease
uiautomatorviewer
simple-schema
ptvs
rustdoc
rational-performance-test
google-identity-toolkit
tablespace
bilinear-interpolation
system.net.mail
openseadragon
qpixmap
persistent-object-store
django-validation
wepay
helm
srv-record
wso2ml
embeddedwebserver
abstract-factory
ocmockito
tidyr
kognitio-wx2
createfile
jolie
dnsjava
bittorrent-sync
tabletools
cpu-time
jms-serializer
strdup
insertonsubmit
delphi-xe4
jbox2d
background-thread
chefspec
itunes-sdk
handshake
multiscaleimage
idispatch
struts2-json-plugin
android-dialog
clearinterval
popup-blocker
telerik-ajax
cakeyframeanimation
uipangesturerecognizer
yuidoc
sigar
firefly-mv
database-deadlocks
canonicalization
git-log
tabbarcontroller
.net-client-profile
rakudo

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App