Stream Connect for Apache Kafka links a Kafka environment to a ServiceNow instance so events can move in both directions. To receive events, you create a consumer, attach a Kafka stream that names the topic to watch, and activate the stream.
How the parts of Stream Connect fit together
Stream Connect routes its traffic through the Hermes Messaging Service, which manages the flow of data between your Kafka environment and the instance.
| Part | Role in the setup |
|---|---|
| Producer | Publishes events, through the Kafka Producer step in Workflow Studio or the ProducerV2 API |
| Consumer | Reads and processes events, as an ETL, Transform Map or Script consumer, or as a Kafka Message flow trigger |
| Kafka stream | The record that defines the data stream feeding one consumer |
| Subscription | Stores the consumer’s settings and metrics. Created when the stream is activated |
| Topic namespace | Groups topics and, on a domain-separated instance, controls which domains can reach them |
Events with the same key are stored in the same partition. Max concurrency sets how many parallel processors consume messages, and it also sets how many partition groups are created.
Check the prerequisites and roles first
Stream Connect needs a Workflow Data Fabric subscription and a Stream Connect subscription. Confirm that the ServiceNow Stream Connect Installer plugin, com.glide.hub.stream_connect.installer, is installed before you open any consumer form. If the wider hub is still being set up, the Integration Hub overview covers the foundations this page assumes. Consumer and stream configuration uses the integration_hub_admin role. A flow that uses the Kafka Message trigger needs the flow_designer or admin role instead.
Configure a Transform Map consumer
A Transform Map consumer reuses a transform map you already use for scheduled imports. Each Kafka message must be one flat JSON object of key-value pairs. Lists and nested objects are not supported, so a message that wraps several records in a list needs reshaping on the sending side first.
Create the consumer record first, then the Kafka stream that feeds it. Navigate to All, IntegrationHub, Consumers, Transform Map Consumer, select New, and fill in the form.
| Field | What to choose |
|---|---|
| Name | A label you will recognize on the consumer list |
| Transform Map | The existing transform map that processes each message |
| Delivery guarantee | No lost but duplicates delivers each message at least once, so some may arrive twice. Once or not at all avoids duplicates, so some messages may not arrive |
| Serialization format | Plain Text is the default. Encoded handles Apache Avro messages and needs a schema |
| Column mapping | Label or Column name, deciding whether JSON keys match the import set column labels or column names |
| Synchronize Inserts | Keeps a single record for each unique coalesce field value |
| Schema registry | Standalone or Confluent. Shown when Serialization format is Encoded |
With the Confluent Schema Registry, a message whose schema ID is missing from the schema table triggers an import of that schema through the configured REST connection.
Configure an ETL consumer
The ETL consumer does the same job with an import set transformer in place of a transform map. Navigate to All, IntegrationHub, Consumers, ETL Consumer.
Two fields are specific to ETL. The Robust import set transformer field names the transformer that runs against each message. The Data in single column checkbox keeps the whole payload in one column. Clear it when each JSON key should land in its own column, and the Column mapping field appears.
Define the Kafka stream that feeds a consumer
For ETL, Transform Map and Script consumers, add the stream from the Kafka Streams section of the consumer record by selecting New. The stream reads nothing until it is active.
| Field | Setting |
|---|---|
| Topic Alias | The topic alias for the topic the stream monitors |
| Max concurrency | Parallel processors to use, which also sets the number of partition groups. Defaults to 1 |
| Relative weight | Shown under Advanced. Processing time per cycle relative to other consumers, from 5 to 2000 |
| Start consuming | Messages received after the first activation, or All the messages stored in the topic |
| Message handling | Automatically optimize, or Manually override with a Maximum messages value |
| Active | Makes the stream active |
The default relative weight equals max concurrency multiplied by the glide.ih.kafka.consumer.max_seconds_per_partition_group property, which defaults to 10 seconds. A consumer with twice another consumer’s weight gets twice the processing time.
The Start consuming choice needs a deliberate decision. Choosing All the messages stored in the topic consumes everything the topic holds, including messages received before the stream was activated. Select Activate under Related Links. The system then creates the subscription. Its page shows records added, records processed and records remaining, which is the quickest check that the stream works. For more setup pitfalls across the hub, see common Integration Hub mistakes and how to avoid them.
Use a Kafka Message trigger in Flow Designer
The Kafka Message trigger removes two steps. You do not create a stream or subscription yourself, because the system creates both when the flow is activated.
In Flow Designer, select New, then Flow, then add a trigger from Application, Kafka Message. The form asks for the topic to monitor, the serialization format, and whether processing starts from the earliest message in the queue or the end of the queue. The Number of messages to process per run setting offers Automatically optimize or Manually override, and the manual value defaults to 100.
Max concurrency and Relative weight are set elsewhere. Open the flow’s record from Flow Administration settings, view Kafka from the additional actions menu, and set them there. Test runs the flow with a message you create in the dialog, not one from the topic. The flow starts receiving topic messages once you activate it.
Plan topic namespaces on a domain-separated instance
Stream Connect supports domain separation at the Standard support level. For Kafka, the control point is the topic namespace. Each topic links to a namespace, a namespace can be assigned to a domain, and topics created under it take that domain. Users can work with topics their domain can access, based on domain visibility and access control lists.
Producers can publish to topics that are visible to their domain. When a stream activates, its subscription and partition groups are created in the same domain. Managing namespace definitions belongs to the kafka_namespace_admin role. On a managed service instance with several domains, granting that role to an administrator inside one domain is not advisable, because it governs the separation between domains.
Monitor consumers and recover failed messages
Producer and consumer messages are written to the Stream Connect Logs table, sys_consumer_log. For more detail, set glide.ih.kafka.stream_connect.debug to true. That property switches itself off after 24 hours.
A message that cannot be delivered is held in the Kafka Undelivered Messages table, sys_kafka_undelivered_messages, and a scheduled job named Kafka Producer Retry tries it again. A batch that times out during processing goes to the Kafka Unprocessed Messages table, sys_kafka_unprocessed_messages. The timeout comes from com.glide.kafka_consumer.timeout, which defaults to 60 seconds. Once the stream is live, run it through the testing and acceptance checklist before you hand it over.
Assign the roles deliberately
Several roles inherit other roles, so one grant can carry more access than its name suggests. Settle them alongside your security and access design for the wider hub.
| Role | What it allows |
|---|---|
| kafka_admin | Manages the Kafka integration, including topics and subscription settings |
| stream_connect_admin | Manages subscriptions, topics and related settings |
| stream_connect_viewer | Read-only access to configuration and runtime statistics |
| stream_connect_alert_viewer | Read-only access to alert records and logs |
| stream_connect_api | Full access to invoke scriptable APIs |
| message_replication_admin | Needed to create message and topic replications |
Replicate topics from your own Kafka cluster
Message replication copies topics between your Kafka cluster and the instance through a MID Server that you configure and start before you create any replication records. A Message Replication record represents one Kafka cluster and parents its topic replications. Each Kafka Topic Replication links one source topic to one destination topic, and a source cannot fan out to several destinations.
Confirm that the Hermes Messaging Service and the Instance PKI Certificate Generator are working, and that a MID Server can reach Hermes through the firewall on ports 4000 to 4050 for the producer and 4100 to 4150 and 4200 to 4250 for the two consumers. Then create a Connection and Credential alias of type Kafka, which needs a Kafka Connection and a Kafka Credential.
Navigate to All, IntegrationHub, Stream Connect, Message Replications and select New. After you save it, add a Kafka Topic Replication. Choose a direction, To ServiceNow or From ServiceNow, pick the ServiceNow topic, and enter the topic name in your Kafka environment. The record name is generated from those fields. Status and Error message show progress on both records, and each topic replication writes a metrics record at 60-second intervals, each with a message count. If you would rather have specialists set up the replications and consumers, Integration Hub implementation support covers that work.
What packaging and entitlement must be confirmed before an event-streaming project uses Kafka Stream Connect?
Before a project uses Kafka Stream Connect, confirm that the contract includes the Stream Connect capability itself, not just a Workflow Data Fabric or Integration Hub entitlement. As of November 2026, the current Advanced package lists Kafka Stream Connect, while the current Foundation description does not. Legacy contracts need a separate check.
Find the package that carries Stream Connect
Next, confirm which package carries it. As of November 2026, Workflow Data Fabric Foundation includes Integration Hub Enterprise, Primary Zero Copy connectors, Data Catalog and AI Data Explorer. The Advanced package adds Kafka Stream Connect and advanced analytics. A buyer on Foundation alone who plans a Kafka feed should confirm the Advanced scope, or a written statement of how Stream Connect is supplied, before the build starts.
Treat older contract names as a separate question
Older Integration Hub and Workflow Data Fabric agreements can use package names that differ from Foundation and Advanced. Current descriptions do not establish that a legacy agreement was amended automatically. Ask for the dated entitlement schedule that applies to your contract, and compare it line by line with the current package. A contract signed before the current packages existed may include Stream Connect, a narrower set of capabilities, or neither.
Estimate metered usage before the first message flows
Stream Connect is metered as well as subscribed. The Data Fabric Credit schedule effective 9 April 2026 lists Kafka Stream Connect ingress or egress at 1 credit per MB. As of November 2026, that is the published conversion. It is a credit rate, not a currency price, so 500 MB of ingress is 500 credits under that schedule. The credit overview describes 12-month credit entitlements, prorated for partial years. Then ask what the rate leaves open:
- Ask whether a message replayed from the start of a topic counts as new ingress.
- Ask whether retries after a failed delivery are metered again.
- Ask how many credits are included, for what term, and whether they pool across applications.
Separate Data Stream actions from Stream Connect in the order
The word stream appears in two products, so an order line should name the one it covers. Integration Hub Data Stream actions suit oversized or paginated results from REST, SOAP and JDBC interfaces, and they require an Integration Hub subscription. Stream Connect sits apart from that, under its own entitlement. If the order mentions only Integration Hub, that line alone has not licensed Stream Connect.
What to request in writing
- The order line that names Kafka Stream Connect, or a statement that it is not included.
- The entitlement schedule that applies to the contract, with its effective date, and the environments it covers.
- The included credit allowance, its term, and its pooling rules.
- The metering basis for ingress and egress, with the rate that applies.
Packaging names and credit rates change between versions. The figures here are as of November 2026, and the signed order form governs what your project may use.
Frequently asked questions
Does a Kafka Message trigger need a separate Kafka stream?
No. The system creates the stream and the subscription when the flow is activated.
Why are older messages in my topic not processed?
The Start consuming setting decides this. A stream set to messages received after the first activation skips anything that arrived earlier. Choose All the messages stored in the topic to include them.
Which role is needed to create replications?
The message_replication_admin role. Consumers and Kafka streams use integration_hub_admin.
What happens to a message the system cannot deliver?
It is held in the Kafka Undelivered Messages table, and the Kafka Producer Retry job attempts delivery again.