Using the producer framework for outbound notifications
Summarize
Summary of Using the producer framework for outbound notifications
The producer framework in ServiceNow enables sending outbound notifications to external systems by picking events from the ServiceNow instance and delivering them via messaging services installed externally. This framework supports integration through Hermes Messaging Service, Open Message Bus, or both, allowing external systems to consume notification details efficiently.
Show less
System Properties
Several system properties must be configured to control how the producer framework operates, especially concerning scheduled jobs:
- Logging Level (snapinotifmgmt.event.log): Defines the granularity of debug logs, ranging from critical errors to detailed debug information. Default is error-level logging.
- Publisher Message Bus Configuration (snapinotifmgmt.publishermessagebusconfiguration): Specifies the messaging service used for publishing messages — Hermes, Open Message Bus, or both. Default is Open Message Bus.
- Inbound Queue Processing Limits:
- Max Records (snapinotifmgmt.inboundqueue.maxrecords): Maximum records processed per scheduler run, influencing batch processing cycles.
- Batch Limit (snapinotifmgmt.inboundqueue.batch.limit): Number of records processed per batch within a scheduler run.
- Mutex Lock Controls:
- Max Spins (snapinotifmgmt.glide.mutex.script.maxspins): Attempts to acquire a mutex lock on inbound queue records.
- Spin Wait (snapinotifmgmt.glide.mutex.script.spinwait): Wait time between mutex lock attempts.
- Scheduler Runtime (snapinotifmgmt.schedule.max.runtime): Maximum allowed runtime for scheduled jobs before failure.
These parameters help optimize performance, ensure reliable processing, and provide control over log verbosity.
Producer Framework Workflow
The processing of outbound notifications follows these key steps:
- The scheduler periodically fetches a configured number of event records from the staging table.
- Glide snapshots of the events are sent to the event processor.
- Snapshots are transformed into TMF 688-compliant event payloads based on the event type, ensuring standardization for trouble ticket events.
- The system routes the notification to the configured messaging service (Hermes Kafka or Open Message Bus) for delivery to the external system.
This workflow ensures standardized, reliable, and configurable outbound notification processing aligned with industry standards.
Related Concepts
- Producing outbound API notifications using Hermes Messaging Service
- Producing outbound API notifications using Open Message Bus
The producer framework picks the event from the ServiceNow instance and sends the outbound notification to the external system. You can consume the details of the notification from the messaging service that is installed in your external system.
System properties
You must configure the system properties to use the producer framework for outbound notification. The following table explains the list of system properties that are set for the scheduled jobs.
| Property | Description | Type |
|---|---|---|
| sn_api_notif_mgmt.event.log | Level of logging to be written to the debug logs. You can select the following logging levels:
Default value: err |
String |
| 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. You can use the following values:
Default value: openMessageBus |
String |
| 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 if the number of records that are in the inbound queue is 130, then 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. |
Integer |
| sn_api_notif_mgmt.inboundqueue.batch.limit | Number of records that the scheduler pulls and processes from the inbound queue at one batch.
|
Integer |
| sn_api_notif_mgmt.glide.mutex.script.maxspins | Maximum number of attempts to acquire a mutex lock in the inbound queue records.
|
Integer |
| sn_api_notif_mgmt.schedule.max.runtime | The maximum time, in milliseconds, that the scheduled job can run before it fails and reports an error.
|
Integer |
| sn_api_notif_mgmt.glide.mutex.script.spinwait | Maximum Time, in milliseconds, to wait between attempts to acquire a mutex lock on the records in the inbound queue.
|
Integer |
Producer framework workflow
- The scheduler picks a number of records at a preconfigured interval and then sends Glide snapshots to the event processor.
- The system converts the Glide snapshot to a TMF 688 complaint event payload based on the event type.
To learn more about the methods used to define and generate the TMF-compliant payloads for trouble ticket events, see TopicAPIUtilsOOB - Scoped.
- The system checks whether the notification configuration is intended for Hermes Kafka or the open message bus.
To learn more about configuring the producer event notification framework, see Producer Event Notification Framework developer guide.