Overview

The OneSignal + Confluent Cloud integration enables automatic syncing of custom events from your managed Kafka topics to OneSignal. This allows you to trigger automated Journeys and personalized messaging campaigns based on real-time user behavioral data flowing through your Confluent Cloud streaming platform.

Requirements

Confluent Cloud

  • Confluent Cloud cluster with active topics
  • API credentials with read access to event topics
  • Schema Registry (optional, for structured event schemas)
  • Event topics containing behavioral data with proper message format

Setup

1

Create API credentials in Confluent Cloud

Generate API credentials for OneSignal in your Confluent Cloud console:
  1. Navigate to Data Integration > API Keys in Confluent Cloud
  2. Click Create key and select Global access
  3. Save the API Key and API Secret (you’ll need these for OneSignal)
  4. Note your Bootstrap servers endpoint from your cluster settings
2

Configure topic ACLs (if using granular permissions)

Grant OneSignal read access to specific topics containing event data:
confluent kafka acl create \
  --allow \
  --service-account <ONESIGNAL_SERVICE_ACCOUNT_ID> \
  --operation READ \
  --topic <EVENT_TOPIC_NAME>

confluent kafka acl create \
  --allow \
  --service-account <ONESIGNAL_SERVICE_ACCOUNT_ID> \
  --operation DESCRIBE \
  --topic <EVENT_TOPIC_NAME>
3

Add integration in OneSignal

In OneSignal, go to Data > Integrations and click Add Integration.Select Confluent Cloud and provide:
  • Bootstrap Servers: Your Confluent Cloud cluster endpoint
  • API Key: Confluent Cloud API key
  • API Secret: Confluent Cloud API secret
  • Consumer Group: Unique group ID for OneSignal (e.g., onesignal-events)
  • Schema Registry URL (optional): If using Confluent Schema Registry
4

Configure event topics

Specify the Confluent Cloud topics containing your event data:
  • Topic Names: Comma-separated list of topics to consume (e.g., user-events,purchase-events)
  • Event Format: JSON, Avro, or Protobuf message format
  • Schema Registry: Enable if using structured schemas
Your event messages should contain:
  • Event name/type (String)
  • User identifier (String)
  • Event timestamp (Long/ISO format)
  • Additional event properties (nested JSON)
5

Test the connection

Click Test Connection to verify OneSignal can connect to your Confluent Cloud cluster and consume event messages.

Event data mapping

Map your to OneSignal’s custom events format:
OneSignal FieldDescriptionRequired
nameevent_nameEvent identifierYes
external_iduser_idUser identifierYes
timestampevent_timestampWhen event occurredNo
propertiesevent_dataNo

Advanced Configuration

Schema Registry Integration

Leverage Confluent Schema Registry for structured event data:
{
  "schema": "user_event_schema_v1",
  "data": {
    "event_name": "purchase",
    "user_id": "user_12345",
    "event_timestamp": 1640995200000,
    "properties": {
      "product_id": "prod_abc123",
      "amount": 29.99,
      "currency": "USD"
    }
  }
}

Consumer Group Management

OneSignal creates a dedicated consumer group to track message offsets:
  • Auto-commit: Offsets committed automatically after successful processing
  • Error Handling: Failed messages logged with retry mechanism
  • Scaling: Partitions balanced across OneSignal consumer instances

Real-time Processing

Confluent Cloud enables near real-time event activation:
  • Low Latency: Events processed within seconds of being published
  • High Throughput: Handles thousands of events per second
  • Fault Tolerance: Built-in replication and automatic failover
Ensure your Confluent Cloud cluster has sufficient throughput capacity to handle OneSignal’s consumption rate alongside your other consumers.

FAQ

How often does OneSignal consume events from Confluent Cloud?

OneSignal consumes events in real-time as they arrive in your topics, with minimal latency (typically under 5 seconds).

Can I consume from multiple topics simultaneously?

Yes, OneSignal can consume from multiple topics in parallel. Specify topic names as a comma-separated list in the configuration.

What happens if OneSignal can’t connect to Confluent Cloud?

OneSignal will retry connections with exponential backoff. Event consumption will resume automatically once connectivity is restored.