Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KafkaMessageQueue #148

Merged
merged 29 commits into from
Jul 21, 2024
Merged

Add KafkaMessageQueue #148

merged 29 commits into from
Jul 21, 2024

Conversation

nerdai
Copy link
Contributor

@nerdai nerdai commented Jul 21, 2024

This PR adds the KafkaMessageQueue which is the integration for Apache Kafka.

  • It uses a combination of kafka-python-ng (the up-to-date fork of kafka-python) as well as aiokafka from the same folks who produced aiohttp.
  • Adds an examples in the examples/kafka folder that contain:
    • Single local launch using KafkaMessageQueue
    • Without Docker launch using KafkaMessageQueue
    • With Docker launch using KafkaMessageQueue

closes #144

@nerdai nerdai marked this pull request as ready for review July 21, 2024 00:10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Future note: Somehow it feels like our examples should be more simple. Feels a little crazy to write this much code for a toy example. I wonder how much of this is worth baking into other abstractions in the library

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree! I think for simple local launch/single examples its easy.

But when looking to deploy these with some orchestration via docker-compose or kubernetes then I am not sure if it can be as easy as a single script.

It would be really nice to simplify the process of building a multi-agent app where we do "intend" to deploy the microservices on their own.

The pattern I've adopted here is:

  • build a multi-agent app Python package
  • that defines all of your microservices and launches them in their associated script
  • this way we can have a single docker image and just change the command for that image to launch the service that you want to launch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an issue to track this for us: #150 😅

Copy link
Collaborator

@logan-markewich logan-markewich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Another queue! 💪

@nerdai
Copy link
Contributor Author

nerdai commented Jul 21, 2024

Alright, thanks for the review @logan-markewich! I'm pretty sure I got everything covered from your comments thru direct changes or adding some new issues in our board!

Going to merge this now. 🙏🚀

@nerdai nerdai merged commit e1d2339 into main Jul 21, 2024
6 checks passed
@nerdai nerdai deleted the nerdai/kafka branch July 21, 2024 04:40
@nerdai nerdai added the example New example label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Apache Kafka as MessageQueue
2 participants