Troubleshooting¶
Common issues and solutions for messagekit integration.
Events stuck in outbox (not publishing)¶
Symptoms:
Events persist to
outbox_eventstablepublishedflag remainsfalseNo events appearing in Kafka topics
Solutions:
Verify Kafka Connect Debezium connector is running:
curl http://localhost:8083/connectors/outbox-connector/statusCheck CDC connector configuration points to outbox table:
{ "table.include.list": "public.outbox_events", "transforms": "outbox", "transforms.outbox.type": "io.debezium.transforms.outbox.EventRouter" }
Review Kafka Connect logs for CDC errors:
docker logs kafka-connect
Verify database permissions for Debezium user
Duplicate messages consumed¶
Symptoms:
Same event processed multiple times
Idempotent consumer not preventing duplicates
Solutions:
Ensure
IProcessedMessageStoreis configured in consumer:from messagekit.infrastructure import IdempotentConsumerBase class MyConsumer(IdempotentConsumerBase): def __init__(self, store: IProcessedMessageStore): super().__init__(store)
Verify
processed_messagestable exists and is populatedCheck consumer is using transactional session for store operations
Review Kafka consumer group configuration (enable.auto.commit=false)
Health check failures¶
Symptoms:
/healthendpoint returns unhealthy statusOutbox health check failing
Solutions:
Check outbox table has unpublished events older than threshold:
SELECT COUNT(*) FROM outbox_events WHERE published = false AND created_at < NOW() - INTERVAL '5 minutes';
Verify Kafka Connect CDC is processing changes
Review FastStream broker health endpoint configuration
Check database connection pool exhaustion
Performance issues¶
Symptoms:
Slow outbox writes
High database load
Solutions:
Add database indexes on outbox table (see Setup section)
Tune Debezium CDC polling interval:
{ "poll.interval.ms": "500" }
Increase Kafka Connect worker threads
Review SQLAlchemy connection pool settings
Consider partitioning outbox table by created_at for high volume
Further assistance¶
Review Integration Guide for setup verification
Check Debezium CDC Architecture for publishing details
See Consumer Transactions for idempotency patterns