In this section:
DTP uses the JMS events broker to provide real-time information about events that occur in DTP. The server publishes event messages to a topic and clients can subscribe to the topics to receive these messages.
The broker manages client connectivity and message distribution with the NIO protocol (nio://). The default port is 61617 (see Configuring the JMS Events Broker Port for instructions on changing the default port). Example URI: nio://hostname:61617.
All events published to the Events Broker are logged to the jms.log file. See Viewing Log Files for instructions on accessing logs.
Choose Report Center Settings from the settings menu (gear icon) and click Event Broker in the sidebar to access the event broker interface. The interface enables you to review event broker topics.
By default, DTP is configured to use the MQTT transport connector. The transport connector is specified in the EventsConfig.xml configuration file located in the <DTP_DATA_DIR>/conf directory:
<?xml version="1.0" encoding="UTF-8"?> <events-configuration> <transport-connector port="61617" /> <transport-connector port="1883" protocol="mqtt"/> </events-configuration> |
The following topics are currently available for subscription.
Event Topic | Description | ||
---|---|---|---|
| This topic notifies subscribers about changes to analysis metadata in the Violations and Test Explorers. There are two types of messages with the corresponding
The body of the JSON messages employ the following schema:
| ||
| This topic notifies subscribers about changes to a build review in the Change Explorer. There are two types of messages with the corresponding
Each message also contains a string property 'action' that represents the type of requested action:
Messages are TextMessage types that contain JSON as the message body. Example:
See REST API for more information about the REST endpoint, including how to provide REST authentication. | ||
DataCollector | Notifies subscribers about events created from Data Collector. There are three types of messages with the corresponding
The body of the JSON messages employ the following schema:
For
| ||
PrioritizationView | This topic is deprecated in DTP 5.1.4 and later. If you are currently using this topic, we strongly recommend switching to the This topic notifies subscribers about violation priority changes made in the Violations Explorer. There is only one type of message, so
The
An array of the violation’s modification history is returned, and the eventId can be used to correlate what has changed. | ||
Project | This topic notifies subscribers about changes made to projects. DTP will publish an event each time a project is created, updated, or deleted. Messages are
The JMSType values are:
Each message also contains a string property
In the following example, a message selector detects when only the "Parabank" project is updated:
You can use the For example, assume that the project ID for the updated "Parabank" project in the previous example is 27. You could apply a https://yourserver:8443/grs/api/v1/projects/27 See REST API for more information about the REST endpoint, including how to provide REST authentication. |
Authentication is not required to subscribe to a topic, but authentication is required to publish to a topic. You must restart DTP Server anytime you make changes to the EventsConfig.xml or eventsbeans. xml configuration file for changes to take effect.
<topic-authentication>
element and set the enabled attribute to true
(default). Set the attribute to false
to disable authentication. Changing username and password is not recommended. You can control which topics do not require authentication after authentication has been enabled.
Add topic names to the list of nonAuthenticatedTopics
property in the destinationAuthenticationManager
bean:
<bean id="destinationAuthenticationManager"> <property name="nonAuthenticatedTopics"> <list> <value>MyTopicName</value> </list> </property> </bean> |
Restart DTP Server (see Starting DTP Applications).