An interactive command-line tool for working with discovery caches and diagnosing discovery issues.
Overview
The Discovery Tool assists in diagnosing issues with discovery by providing interactive access to discovery caches. It allows you to open discovery caches, inspect advertised entities, and monitor entity lifecycle events in real-time.
Running the Discovery Tool
The Discovery Tool can be launched directly from an nvx-core-all jar or nvx-talon-all jar, so long as you also include the jars/classes required by the provider (such as message bus classes and the platform's default third party dependencies).
DiscoveryTool [-h] [<initialCacheDescriptor>]
[<-h|--help> Displays this help message (default='false')]
[initialCacheDescriptor: The initial discovery cache to open]
The following properties can be set in the tool to change its functionality:
Property Name
Default Value
Description
longCommandDisplayThreshold
5
Commands that take longer than the given time in seconds will result in the tool outputting their execution time
stacktraces
false
Whether or not command exception stacktraces should be dumped
Commands
open
Opens a discovery cache.
Usage:
Example:
close
Closes the currently open discovery cache.
Usage:
get
Looks up an entity in the discovery cache.
Usage:
Example:
add
Adds an entity to the discovery cache.
Usage:
Example:
set
Sets a configuration or environment property.
Usage:
Example:
reset
Reset a configuration or environment property to its default value.
Usage:
stacktraces
Sets whether or not command exception stacktraces should be shown.
Usage:
history
Displays command history.
Usage:
help
Displays help message.
Usage:
ansi
Enables or disables ANSI output.
Usage:
echo
Displays a message or turns echo on or off.
Usage:
script
Runs a command script.
Usage:
bye | exit | quit
Exit the tool.
Usage:
Common Usage Patterns
Inspecting Running XVMs
To see what XVMs are currently advertising themselves:
Testing Discovery Configuration
To verify a specific discovery configuration is working:
Monitoring Entity Lifecycle
The Discovery Tool automatically displays events when entities join or leave the discovery cache, making it useful for monitoring entity lifecycle in real-time.
open [-h] [<cacheDescriptor>]
[<-h|--help> Displays this help message (default='false')]
[cacheDescriptor: The discovery cache descriptor to open. If not
specified the default cache descriptor will be used.]
> open mcast://224.0.1.200:4090
close [-h] [<cacheDescriptor>]
[<-h|--help> Displays this help message (default='false')]
[cacheDescriptor: The discovery cache descriptor to open.]
get [-h] <type> <name>
[<-h|--help> Displays this help message (default='false')]
type: The type of entity to add
name: The name of the entity to add
> get Server MyXVM
add [-h] <type> <name> <descriptor>
[<-h|--help> Displays this help message (default='false')]
type: The type of entity to add
name: The name of the entity to add
descriptor: The connection descriptors to broadcast for the entity
> add Application TestApp tcp://localhost:9000
set [-h] [<propName>] [<propValue>]
[<-h|--help> Displays this help message (default='false')]
[propName: The name of property to set, if no name is set config
properties are listed]
[propValue: The value of the property to set. If omitted clears the
property]
> set stacktraces true
> set longCommandDisplayThreshold 10
reset [-h] <propName>
[<-h|--help> Displays this help message (default='false')]
propName: The name of property to reset. '*' resets all properties
to their default value.
stacktraces [-h] <enabled>
[<-h|--help> Displays this help message (default='false')]
enabled: <off|on|false|true> Indicates whether or not command
exceptions should be displayed
history [-h] [-c] [<n>]
[<-h|--help> Displays this help message (default='false')]
[<-c|--clear> Clears command history]
[n: lists only the last 'n' lines default='1000']
help [-h] [<command>]
[<-h|--help> Displays this help message (default='false')]
[command: When specified displays help for that command only]
ansi [-h] [<value>]
[<-h|--help> Displays this help message (default='false')]
[value: <off|on> Turns ANSI on or off. With no argument display the
current ANSI setting]
echo [-h] [<value>]
[<-h|--help> Displays this help message (default='false')]
[value: Displays a message or turns echo on or off. With no argument
list the current echo setting]
[message: A message to display default='']
script [-h] [<script>]
[<-h|--help> Displays this help message (default='false')]
[script: The script file to execute]
bye [-h]
[<-h|--help> Displays this help message (default='false')]
# Open the default multicast discovery cache
> open mcast://224.0.1.200:4090
# Look for Server entities
> get Server MyXVM
# Open discovery cache with specific configuration
> open solace://solhost:55555&single_session=true
# The tool will show any entities it discovers