Products | Versions |
---|---|
TIBCO BusinessEvents Enterprise Edition | N/A |
I have an EMS queue to which my BusinessEvents application is subscribed. I would like to get the pending message count at regular intervals, for example every 5 seconds. How can I log this information to a file so that I can analyze how many pending messages remained at a particular point in time? This could help troubleshoot issues in my BusinessEvents application that may relate to EMS message processing performance.
show queue Subject.BookData
tibemsadmin.exe -server "tcp://localhost:7222" -user admin -password admin -script tibemsadmin.txt
TIBCO Enterprise Message Service Administration Tool.
Copyright 2003-2019 by TIBCO Software Inc.
All rights reserved.
Version 8.5.1 V4 9/12/2019
Connected to: tcp://localhost:7222
Command: show queue Subject.BookData
Queue: Subject.BookData
Type: static
Properties: *prefetch=5,*store=$sys.nonfailsafe
JNDI Names: <none>
Bridges: <none>
Receivers: 0
Pending Msgs: 568, (0 persistent)
Delivered Msgs: 0
Pending Msgs Size: 64.3 Kb, (0.0 Kb persistent)
@echo off
cd %EMS_HOME%\bin
:loop
:: Log the current time
echo %date% %time% >> pending-msgs.log
:: Log the pending message count
tibemsadmin.exe -server "tcp://localhost:7222" -user admin -password admin -script tibemsadmin.txt | findstr /R /C:"\<Pending Msgs:" >> pending-msgs.log
:: Collection interval in seconds
timeout /t 5
goto loop
#!/bin/bash
cd $EMS_HOME/bin
while true; do date >> pending-msgs.log ; ./tibemsadmin -server "tcp://localhost:7222" -user admin -password admin -script tibemsadmin.txt | grep Pending\ Msgs\: >> pending-msgs.log ; sleep 5; done
tibemsadmin.exe -server "ssl://localhost:7243" -user admin -password admin -ssl_trusted ..\samples\certs\server_root.cert.pem -ssl_identity ..\samples\certs\client_identity.p12 -ssl_issuer ..\samples\certs\client_root.cert.pem -ssl_password password -ssl_hostname server
./tibemsadmin -server ssl://127.0.1.1:7243 -user admin -password admin -ssl_trusted ../samples/certs/server_root.cert.pem -ssl_identity ../samples/certs/client_identity.p12 -ssl_password password -ssl_hostname server