Producer Event Notification Framework developer guide
Summarize
Summary of Producer Event Notification Framework developer guide
The Producer Event Notification Framework for Telecommunications, Media, and Technology in ServiceNow enables external distribution of events such as trouble tickets via a message-bus within your network. It supports two primary message-bus configurations to publish events from your ServiceNow instance to external consumers:
Show less
- Hermes Messaging Service (Kafka): Designed for cloud-based instances, this requires prior installation and configuration of Hermes Messaging Service. It is used to publish events through Hermes Kafka.
- Open Message Bus: Suitable for both cloud-based and on-premise instances, this option supports custom message-bus implementations to send events to consumers on your network.
Configuration and Implementation
To implement either message-bus use case, you must configure your ServiceNow instance accordingly. This involves system configuration and overriding specific script includes to integrate the message-bus within your ServiceNow ecosystem. Detailed guidance is available for configuring the Producer Event Notification Framework for both Hermes Messaging Service and the open message bus.
Producer System Properties
The framework includes several system properties in your ServiceNow instance that control its behavior. These properties can be reviewed and modified to tailor the framework to your needs via All > System Properties > All Properties in the ServiceNow UI. Key properties include:
- snapinotifmgmt.event.log: Sets the logging level for event notifications (default: error).
- snapinotifmgmt.glide.mutex.script.maxspins: Maximum attempts to acquire a mutex lock on inbound queue records (default: 100).
- snapinotifmgmt.glide.mutex.script.spinwait: Wait time in milliseconds between mutex lock attempts (default: 100 ms).
- snapinotifmgmt.inboundqueue.batch.limit: Number of records processed per scheduler batch (default: 200).
- snapinotifmgmt.inboundqueue.maxrecords: Maximum records processed per scheduler run, used with batch limit to manage processing load (default: 200).
- snapinotifmgmt.publishermessagebusconfiguration: Defines which message bus to use for publishing events — Hermes, open message bus, or both (default: openMessageBus).
- snapinotifmgmt.schedule.max.runtime: Maximum runtime in milliseconds allowed for a schedule job before failure (default: 90,000 ms).
Practical Benefits
By leveraging the Producer Event Notification Framework, ServiceNow customers can efficiently distribute event notifications externally using a scalable message-bus system. This capability is essential for integrating ServiceNow events with other systems in telecommunications, media, and technology environments, enabling real-time alerting and improved operational workflows.
The Producer Event Notification Framework for Telecommunications, Media, and Technology enables the external distribution of events, such as trouble tickets, using a message-bus implemented in your network.
- Publishing events through the Hermes Messaging Service: If you plan to publish events using Hermes Kafka, you must configure the Producer Event Notification Framework for the Kafka message-bus. You can only use this message-bus for
cloud-based instances. For details, see Configure the Producer Event Notification Framework to use the Hermes Messaging Service.
For additional information on how to publish trouble ticket notifications using Hermes, see Producing outbound API notifications using Hermes.
Note:Before you are able to implement this use case, you must already have the Hermes Messaging Service installed and configured on your instance. For details, see Hermes Messaging Service. - Publishing events through the open message bus: If your instance uses a custom message-bus, you must configure the Producer Event Notification Framework to use the open message bus to send events from your ServiceNow instance to consumers on your network. Both cloud-based and on-premise ServiceNow instances can publish events through the open message bus. For details, see Configure the Producer Event Notification Framework to use the Open Message Bus.
For additional information on how to publish trouble ticket notifications using the open message bus, see Producing outbound API notifications using the open message bus.
This document describes the system configuration that must be performed, including the script includes that must be overridden to deploy these message-bus implementations in your ServiceNow ecosystem.
Producer system properties
The following table lists the properties within your ServiceNow instance that control the functionality of the Producer Event Notification Framework. Review the default values of these properties and if necessary, modify them for your specific implementation. To modify these properties, in the ServiceNow UI go to .
| Property | Description |
|---|---|
| sn_api_notif_mgmt.event.log | Level of logging to written to the debug logs. Valid values:
Default: err |
| sn_api_notif_mgmt.glide.mutex.script.maxspins | Maximum number of attempts to acquire a mutex lock on the records in the inbound queue. Default: 100 |
| sn_api_notif_mgmt.glide.mutex.script.spinwait | Time to wait between attempts to acquire a lock on the records in the inbound queue. Unit: Milliseconds Default: 100 |
| sn_api_notif_mgmt.inboundqueue.batch.limit | Number of records that the scheduler
will
pull and process from the inbound queue at one time (one batch). Default: 200 |
| sn_api_notif_mgmt.inboundqueue.maxrecords | Maximum number of records that the scheduler will pull from the inbound queue for one scheduler run. This value is used in conjunction with the sn_api_notif_mgmt.inboundqueue.batch.limit
parameter. For example, if the batch limit is set to 50 and the maxrecords is set to 200, and the number of records that are in the inbound queue is 130, the scheduler would pull three different batches of records in a single run; two with 50 records and one with 30 records. If the number of records in the inbound queue is 220, the scheduler would pull four batches of 50 records and the remaining 20 records would not be processed until the next time the scheduler runs. When setting this value, you must also consider the time that it will take for the scheduler to process multiple batches and set the sn_api_notif_mgmt.schedule.max.runtime value accordingly. Default: 200 |
| sn_api_notif_mgmt.publisher_message_bus_configuration | Defines whether messages are published using the Hermes Messaging Service, the open message bus, or both message buses. Valid values:
Default: openMessageBus |
| sn_api_notif_mgmt.schedule.max.runtime | Max time that a schedule job can run before it fails and reports an error. Unit: Milliseconds Default: 90,000 |