Skip to content

use franz as new kafka lib#466

Open
gokutheengineer wants to merge 3 commits intobsv-blockchain:mainfrom
gokutheengineer:gokhan/new-kafka-lib
Open

use franz as new kafka lib#466
gokutheengineer wants to merge 3 commits intobsv-blockchain:mainfrom
gokutheengineer:gokhan/new-kafka-lib

Conversation

@gokutheengineer
Copy link
Collaborator

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🤖 Claude Code Review

Status: Complete

This PR migrates from IBM Sarama to franz-go as the Kafka client library, significantly simplifying the codebase by reducing abstraction layers.

Issues Found:

  1. Potential goroutine leak in util/kafka/in_memory_kafka/in_memory_kafka.go:487-500 - The goroutine in InMemoryConsumerGroupClaim.Messages() that filters messages based on pause state lacks a cleanup mechanism. If the consumer stops reading from the filtered channel, the goroutine will block indefinitely on filtered <- msg, potentially accumulating in long-running test suites. Consider adding context-aware cleanup or a timeout to prevent indefinite blocking.

Architecture Changes:

  • Removed Sarama dependency, adopted franz-go (more modern, better performance)
  • Simplified in-memory Kafka mock (removed complex Sarama interface implementations)
  • Direct franz-go API usage instead of abstraction layers
  • Consumer/producer code is cleaner and more maintainable

Code Quality:

  • Test updates properly reflect new message structure (removed Sarama wrapper)
  • Error handling maintained throughout
  • TLS configuration properly migrated
  • Watchdog and health check logic preserved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant