get-all-kafka-cluster-names
Description
Retrieves a list of all Kafka cluster names that are configured in Unica Platform. Kafka clusters are used in Detect for:
- Real-Time Event Streaming: Ingesting high-velocity event data from external systems
- Destination Publishing: Sending trigger events, journey messages, and audience updates to Kafka topics
- Feed Application Processing: Consuming event streams for profile enrichment and aggregation
- Inter-Component Communication: Communication between Detect Engine and Backend services
Each Kafka cluster configuration includes bootstrap servers, security settings, and producer/consumer properties.
Syntax
Windows:
CliTool.bat get-all-kafka-cluster-names
Linux:
./CliTool.sh get-all-kafka-cluster-names
Parameters
This command does not require any parameters or options. It retrieves all Kafka clusters configured in Platform, regardless of user permissions (Kafka clusters are globally accessible to authenticated users).
Sample Execution
Windows:
C:\> cd %HCL_UNICA_DETECT_HOME%\tools\bin
C:\> CliTool.bat get-all-kafka-cluster-names
Found 1 kafka clusters:
[prod-kafka-cluster]
Linux:
$ cd $HCL_UNICA_DETECT_HOME/tools/bin
$ ./CliTool.sh get-all-kafka-cluster-names
Found 1 kafka clusters:
[prod-kafka-cluster]
Output Format
The command produces two lines of output:
- Count Line:
Found <count> kafka clusters:where<count>is the total number of clusters - Name List: A Java List representation with cluster names:
[CLUSTER1, CLUSTER2, CLUSTER3, ...]Example Outputs:
Multiple Clusters:Found 2 kafka clusters: [staging-kafka, prod-kafka]No Clusters:Found 0 kafka clusters: []Single Cluster:Found 1 kafka clusters: [production-kafka]
Understanding Kafka Clusters
A Kafka cluster in Unica Platform represents a complete Apache Kafka deployment configuration containing:
- Cluster Name: Unique identifier (e.g.,
prod-kafka-cluster) - Bootstrap Servers: Comma-separated list of Kafka broker addresses (e.g.,
kafka1.prod.com:9092,kafka2.prod.com:9092) - Security Configuration: SASL, SSL/TLS, authentication mechanisms
- Connection Properties: Timeouts, compression, retry settings
- Producer Settings: Acks, batching, idempotence configurations
- Consumer Settings: Group coordination, offset management
Use Cases
- Before Creating a Kafka
Destination
# Verify Kafka cluster exists ./CliTool.sh get-all-kafka-cluster-names # If "prod-kafka-cluster" appears, use it in destination ./CliTool.sh create-destination -f destination-kafka.jsonSample destination-kafka.json:{ "name": "Journey Kafka Only", "description": "Journey destination with Kafka connector only", "templateId": 1, "messageConfig": { "payloadEntrySourceCode": "ES-001" }, "feedAttributeMapping": [ { "feedId": 1, "attributes": { "profile": { "journey_customer_id": "CUSTOMER_ID", "journey_customer_name": "CUSTOMER_NAME", "journey_email": "EMAIL_ADDRESS" }, "tuple": { "journey_event_id": "EVENT_ID", "journey_timestamp": "EVENT_TIMESTAMP", "journey_event_type": "EVENT_TYPE" } } } ], "connectorConfig": { "kafka": { "connectorType": "KAFKA", "topic": "<<JOURNEY_TOPIC_NAME>>", "clusterName": "<<JOURNEY_CLUSTER_NAME>>" } } }
Kafka Cluster Naming Conventions
While cluster names are arbitrary, we recommend following these conventions:
| Convention | Example | Use Case |
|---|---|---|
| Environment-based |
prod-kafka |
Separate clusters per environment |
| Purpose-based | events-kafka, analytics-kafka, streams-kafka |
Separate by data type or workload |
| Region-based | us-east-kafka, eu-west-kafka, apac-kafka |
Geo-distributed deployments |
| Tenant-based | tenant-a-kafka, tenant-b-kafka, shared-kafka |
Multi-tenant architectures |
Permission Model
Unlike datasources, Kafka cluster configurations in Platform are typically globally accessible to all authenticated users. This means:
- No per-user ACLs on cluster visibility
- All users see the same list of cluster names
- Access control is enforced at the Kafka broker level (SASL, SSL, ACLs)
- Detect validates connectivity when creating destinations
If you see an empty list:
- Verify Kafka clusters are configured in Platform (Settings ' Configuration ' Kafka Clusters)
- Check Platform database for Kafka cluster entries
- Ensure Detect is properly integrated with Platform (
populateDb.bat -n UnicaDetect) - Review Platform logs for configuration loading errors
Related API Endpoint
- REST API:
GET /api/unicadetect/v1/configuration/kafka-clusters - Service Interface:
ConfigurationService.getKafkaClusterConfigs() - Return Type:
KafkaConfigurationscontainingList<KafkaClusterConfigDto> clusters - Authentication: OAuth2 bearer token (automatically handled by CLI)
What Information is Returned?
The CLI displays only the cluster names. The complete cluster configuration (bootstrap servers, security properties, etc.) is not displayed for security reasons. To view full cluster details, use:
- Platform UI: Settings ' Configuration ' Kafka Clusters
- Platform API: Direct REST calls to Platform configuration endpoints
- Detect Admin UI: (when available) will show cluster details during destination setup
Exit Codes
0" Success (clusters retrieved; list may be empty if none configured)1" Error occurred (connection failure, authentication failure, etc.)
- Empty list (
[]) indicates no Kafka clusters are configured in Platform - Cluster names are case-sensitive when used in destination configurations
- Names are returned in the order they are stored in Platform
- This command is read-only and safe to run in production
- Cluster configuration changes in Platform require Detect backend restart to take effect