Overview
Namespaces are logical groupings of topics within a tenant. They provide isolation and allow you to configure policies like retention, TTL, replication, and more. The Namespaces API provides comprehensive control over namespace configuration. Base Path:/admin/v2/namespaces
List Namespaces
Get all namespaces for a specific tenant.Path Parameters
The tenant name
Example
Response Example
Get Namespace Policies
Retrieve all policies configured for a namespace.Path Parameters
The tenant name
The namespace name
Response
Permission policies for roles
List of clusters for geo-replication
Bundle split configuration
Backlog quota policies
Message persistence configuration
Message retention settings
Time-to-live for messages
Example
Create Namespace
Create a new namespace within a tenant.Path Parameters
The tenant name
The namespace name to create
Request Body
Optional policies to set during creation
Example
Response Codes
| Code | Description |
|---|---|
| 204 | Namespace created successfully |
| 403 | Don’t have admin permission |
| 404 | Tenant doesn’t exist |
| 409 | Namespace already exists |
| 412 | Namespace name is not valid |
Delete Namespace
Delete a namespace and all its topics.Path Parameters
The tenant name
The namespace name to delete
Query Parameters
Force delete even if namespace is not empty
Whether this broker is authoritative for the operation
Example
Get Topics
List all topics in a namespace.Path Parameters
The tenant name
The namespace name
Query Parameters
Topic mode: PERSISTENT, NON_PERSISTENT, or ALL
Whether to include system topics
Example
Permissions
Grant Permission
Grant permissions to a role on a namespace.Path Parameters
The tenant name
The namespace name
The role name
Request Body
Array of actions: “produce”, “consume”, “functions”
Example
Get Permissions
Retrieve permissions for a namespace.Example
Revoke Permission
Revoke all permissions from a role on a namespace.Example
Message TTL
Set Message TTL
Set the time-to-live for messages in a namespace.Request Body
TTL in seconds
Example
Get Message TTL
Get the message TTL for a namespace.Remove Message TTL
Remove the message TTL setting.Replication
Set Replication Clusters
Configure geo-replication for a namespace.Request Body
List of cluster names for replication
Example
Get Replication Clusters
Get the list of replication clusters.Deduplication
Enable/Disable Deduplication
Request Body
Enable or disable broker-side deduplication
Example
Get Deduplication Status
Auto Topic Creation
Set Auto Topic Creation
Configure automatic topic creation settings.Request Body
Whether to allow automatic topic creation
Type of topics to create: “partitioned” or “non-partitioned”
Default number of partitions for partitioned topics
Example
Best Practices
Namespace Organization
- Create separate namespaces for different environments (dev, staging, prod)
- Use namespaces to isolate different applications or teams
- Keep related topics in the same namespace
Policy Configuration
- Set appropriate retention policies based on use case
- Configure message TTL to prevent unbounded growth
- Enable deduplication for exactly-once semantics
Geo-Replication
- Configure replication for disaster recovery
- Consider network latency between clusters
- Monitor replication lag
Permissions
- Use least privilege principle
- Grant permissions at namespace level when possible
- Regularly audit and review permissions
Related Resources
Tenants API
Manage parent tenant resources
Topics API
Manage topics within namespaces