Key Concepts
Partitions
Topics are split into partitions for parallel processing. Each partition is an ordered, immutable sequence of messages.
Replication
Partitions are replicated across brokers for fault tolerance. The replication factor determines how many copies exist.
Retention
Messages are retained for a configurable time period or until a size limit is reached, then deleted or compacted.
Consumer Groups
Consumer groups track which messages have been read. Each partition is consumed by one consumer in a group.
Required Permissions
| Action | Permission |
|---|---|
| View topics | iam:project:infrastructure:kafka:read |
| Create topics | iam:project:infrastructure:kafka:write |
| Update topic configuration | iam:project:infrastructure:kafka:write |
| Delete topics | iam:project:infrastructure:kafka:delete |
| Clear messages | iam:project:infrastructure:kafka:delete |
| Produce messages | iam:project:infrastructure:kafka:produce |
How to Create a Topic
Enter Basic Settings
Configure the topic fundamentals:
- Topic Name (required): Unique identifier
- Partitions: Number of partitions (1-1000)
- Replication Factor: Number of replicas (1-10)
Configure Advanced Settings
Optionally set retention and cleanup policies:
- Retention (ms): How long to keep messages (-1 for unlimited)
- Cleanup Policy: delete, compact, or both
- Min In-Sync Replicas: Minimum replicas for acks=all
Topic Name Rules
Topic names must follow these rules:| Rule | Description |
|---|---|
| Length | 1-255 characters |
| Characters | Letters, numbers, dots (.), underscores (_), hyphens (-) |
| Reserved | Names starting with _ are reserved for internal Kafka topics |
Partition Guidelines
| Scenario | Recommended Partitions |
|---|---|
| Low throughput | 1-3 |
| Medium throughput | 6-12 |
| High throughput | 12-50 |
| Very high throughput | 50+ |
Partition count can only be increased, never decreased. Start with fewer partitions and scale up as needed.
How to View Topic Details
How to Browse Messages
Configure Filters
Set filters to find specific messages:
- Partition: Filter by specific partition
- Offset: Start from a specific offset
- Key Contains: Search by message key
- Value Contains: Search by message value
How to Produce a Message
Enter Message Details
Configure the message:
- Key (optional): Message key for partitioning
- Value (required): Message content
- Partition (optional): Target partition (-1 for auto)
- Headers (optional): Key-value metadata
How to Update Topic Configuration
Common Configuration Options
| Configuration | Description | Default |
|---|---|---|
retention.ms | How long to retain messages | 604800000 (7 days) |
cleanup.policy | delete, compact, or delete,compact | delete |
min.insync.replicas | Min replicas for acks=all | 1 |
segment.bytes | Log segment size | 1073741824 (1 GB) |
max.message.bytes | Max message size | 1048588 (~1 MB) |
How to Increase Partitions
How to Clear Messages
Clearing messages deletes all data from a topic while keeping the topic itself.How to Delete a Topic
How to Use Favorites
Mark frequently used topics as favorites for quick access.Understanding Partition Details
Each partition displays:| Field | Description |
|---|---|
| Leader | Broker ID handling reads/writes for this partition |
| Replicas | List of broker IDs holding copies |
| ISR | In-Sync Replicas - replicas caught up with leader |
| Start Offset | Lowest available offset (oldest message) |
| End Offset | Highest offset (next message position) |
Under-Replicated Partitions (URP)
A partition is under-replicated when ISR count < replica count. This indicates:- A broker is down or unreachable
- A replica is falling behind
- Network issues between brokers
Cleanup Policies
| Policy | Behavior |
|---|---|
| delete | Delete messages older than retention period |
| compact | Keep only the latest value for each key |
| delete,compact | Compact first, then delete old segments |
When to Use Compact
Use compaction for:- State stores (latest user profile, settings)
- Changelog topics
- Deduplication scenarios
Compacted topics keep messages indefinitely until a newer message with the same key arrives. Set
delete.retention.ms to control how long tombstones are retained.Troubleshooting
Topic creation failed
Topic creation failed
- Topic name may already exist
- Invalid characters in topic name
- Replication factor exceeds available brokers
- Cluster may be in maintenance mode
Messages not appearing
Messages not appearing
- Messages may be in a different partition
- Check if you’re looking at the correct offset range
- Consumer may have already committed past these offsets
- Topic may have low retention and messages expired
Cannot produce messages
Cannot produce messages
- You need produce permission
- Topic may be read-only (internal topics)
- Message size may exceed
max.message.bytes - Cluster may be unavailable
Cannot delete topic
Cannot delete topic
- You need delete permission
- Topic may be in use by active consumers
- Cluster’s
delete.topic.enablemay be false
Partition count cannot be decreased
Partition count cannot be decreased
This is a Kafka limitation. Partition count can only increase, never decrease. To reduce partitions, create a new topic with fewer partitions and migrate data.
High consumer lag
High consumer lag
- Consumer may be processing slowly
- Consumer group may have fewer members than partitions
- Consider increasing partition count and consumer instances
- Check for processing errors in consumer application
FAQ
What's the difference between partitions and replicas?
What's the difference between partitions and replicas?
Partitions enable parallel processing - each partition can be consumed by a different consumer. Replicas provide fault tolerance - they’re copies of partitions on different brokers. A topic with 6 partitions and replication factor 3 has 18 total partition replicas distributed across brokers.
How do I choose the right number of partitions?
How do I choose the right number of partitions?
Consider: (1) Expected throughput - more partitions enable higher parallelism, (2) Number of consumers - each partition can only be consumed by one consumer in a group, (3) Ordering requirements - messages are only ordered within a partition. Start small and increase as needed.
What happens when a broker fails?
What happens when a broker fails?
If a broker fails, leadership for its partitions moves to another broker with a replica. If the failed broker had the only replica (replication factor 1), those partitions become unavailable. Use replication factor >= 3 for production.
How does message ordering work?
How does message ordering work?
Messages are ordered within a partition only. Messages with the same key go to the same partition (by default), ensuring order for that key. Messages with different keys may be processed out of order across partitions.
What is min.insync.replicas?
What is min.insync.replicas?
This setting defines the minimum number of replicas that must acknowledge a write before it’s considered successful (when producer uses
acks=all). Set to replication_factor - 1 for best availability while maintaining durability.Can I change a topic's replication factor?
Can I change a topic's replication factor?
Not directly through this UI. Changing replication factor requires Kafka’s reassignment tool. You would need to create a reassignment plan and execute it using Kafka CLI tools.
What are internal topics?
What are internal topics?
Topics starting with
_ or __ are internal Kafka topics (like __consumer_offsets, __transaction_state). They’re managed by Kafka and shouldn’t be modified directly. By default, they’re hidden from the topic list.How long are messages retained?
How long are messages retained?
Controlled by
retention.ms (time-based) and retention.bytes (size-based). Messages are deleted when either limit is exceeded. Default is 7 days. Set to -1 for unlimited time-based retention.Best Practices
Naming Conventions
Use consistent naming patterns:Partition Strategy
- Key-based: Messages with same key go to same partition (default)
- Round-robin: No key means random partition assignment
- Custom: Use custom partitioner for special requirements
Production Settings
For production topics:Monitoring
Monitor these metrics:- Under-replicated partitions (should be 0)
- Consumer lag (should be stable or decreasing)
- Message rate (for capacity planning)
- Partition distribution (should be balanced)