The Service Integration Bus Link provides communication between a messaging engine in the local bus and a messaging engine in the remote bus. Messages will be persisted in bus link transmitter before transmitting across the bus link. A bus link can have a transmitter for each Messaging Engine running in the source bus. This blog discuss about the ways to monitor the message depth in a Service Integration Bus Link transmitter.
(1) Manual approach
From the admin console, go through the following link to view the status of link transmitter and number of messages in the link transmitter.
Service integration -> Buses -> bus_name -> [Topology] Foreign bus connections -> foreign_bus_name -> [Related Items] Service integration bus links -> link_name -> [Related Items] Link transmitters
(2) Automatic approach using wsAdmin script
Please refer the sample “Jython” based wsAdmin script to print the bus link transmitter status and the number of messages. The current script prints the status for each 5 seconds, but this time interval value is configurable in the code.
The sample script assumes that there is only one SIBLinkTransmitter in the ME. If you want to print the status and message depth for SIBLinkTransmitter from all the ME’s (in a cluster level or cell level), you need to modify this script to iterate each and every “SIBLinkTransmitter” resulted in AdminControl.queryNames().
The sample wsAdmin command to list all the MEs running under cluster level would be.
The sample wsAdmin command to list all the MEs running under cell level would be.
# Sample program
# * (C) COPYRIGHT International Business Machines Corp., 2012
# * All Rights Reserved * Licensed Materials - Property of IBM
# * This sample program is provided AS IS and may be used, executed,
# * copied and modified without royalty payment by customer
# * (a) for its own instruction and study,
# * (b) in order to develop applications designed to run with an IBM
# * WebSphere product for the customer's own internal use.
# Script to print the bus link transmitter status and other information for every 5 seconds
# You can also list more than one SIBLinkTransmitter running under JVM or cluster or cell and iterate
# each of them to print the status and number of messages
# Get SIBLinkTransmitter mbean for the ME, with an assumption that there is only one SIBLinkTransmitter for this ME
# if ” queryNames“ returns more than one SIBLinkTransmitter, you should iterate and print the data for each of them
lt = AdminControl.queryNames("type=SIBLinkTransmitter,name= <ME Name>,*")
params = 
paramTypes = 
linkName = AdminControl.invoke(lt, "getLinkName", params, paramTypes)
linkType = AdminControl.invoke(lt, "getLinkType", params, paramTypes)
busName = AdminControl.invoke(lt, "getBusName", params, paramTypes)
foreignBusName = AdminControl.invoke(lt, "getForeignBusName", params, paramTypes)
MEName = AdminControl.invoke(lt, "getEngineName", params, paramTypes)
transmitterType = AdminControl.invoke(lt, "getTransmitterType", params, paramTypes)
print "Basic BusLink information:"
print "Buslink Name : ", linkName
print "Buslink Type : ", linkType
print "BusName : ", busName
print "ForeignBuslink Type : ", foreignBusName
print "Messaging Engine Name: ", MEName
print "Tramsmitter Type : ", transmitterType
var = 1
while (var ==1):
status = AdminControl.invoke(lt, "getState", params, paramTypes)
depth = AdminControl.invoke(lt, "getDepth", params, paramTypes)
numberOfMessagesSent = AdminControl.invoke(lt, "getNumberOfMessagesSent", params, paramTypes)
timeSinceLastMessageSent = AdminControl.invoke(lt, "getTimeSinceLastMessageSent", params, paramTypes)
print "Summary of the LinkTransmiter ", linkName + " at ", time.ctime()
print "Status : ", status
print "Depth of outbound messages : ", depth
print "Number of messages sent : ", numberOfMessagesSent
print "Time since last message sent :", timeSinceLastMessageSent
##### Wait for 5 seconds, the print the bus link transmitter status summary again.
time.sleep( 5 )print 'END'
Basic BusLink information:
Buslink Name : Bus2: Bus1
Buslink Type : SIBVirtualGatewayLink
BusName : Bus1
ForeignBuslink Type : Bus2
Messaging Engine Name : IBM-LN1IHU1T0MKNode01.server1- Bus1
Tramsmitter Type : QUEUE
Summary of the LinkTransmiter Bus2:Bus1 at Fri Jun 28 18:39:51 2013
Health : STARTED
HealthReason : CWSIP0920I: Status OK
Depth of outbound messages : 0
Number of messages sent : 3
Time since last message sent : 3079952