Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Add receiver tool#244

Merged
c-w merged 3 commits into
masterfrom
receiver-tool
Feb 4, 2019
Merged

Add receiver tool#244
c-w merged 3 commits into
masterfrom
receiver-tool

Conversation

@c-w

@c-w c-w commented Feb 4, 2019

Copy link
Copy Markdown
Contributor

Add receiver tool to mirror the sender tool. This makes testing the pipeline much easier. For example, with the following Docker session:

# build the app
docker build --target builder -t agogosml -f agogosml/Dockerfile.agogosml agogosml

# run kafka as the broker
docker network create agogosml
docker run --rm --name kafka --network agogosml -p 2181:2181 -p 9092:9092 --env ADVERTISED_PORT=9092 spotify/kafka

# create an event receiver
docker run --network agogosml -it agogosml python -m agogosml.tools.receiver --receiver kafka '{"KAFKA_ADDRESS":"kafka:9092","KAFKA_TOPIC":"mytopic","KAFKA_CONSUMER_GROUP":"mygroup"}'

# send some events
docker run --network agogosml -it agogosml python -m agogosml.tools.sender --infile LICENSE --sender kafka '{"KAFKA_ADDRESS":"kafka:9092","KAFKA_TOPIC":"mytopic"}'

All Submissions:

  • Have you followed the guidelines in our Contributing document?

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

  • Does your PR follow our Code of Conduct?

  • Have you added an explanation of what your changes do and why you'd like us to include them?

  • Does each method or function "do one thing well"? Reviewers may recommend methods be split up for maintainability and testability.

  • Is this code designed to be testable?

  • Is the code documented well?

  • Does your submission pass existing tests (or update existing tests with documentation regarding the change)?

  • Have you added tests to cover your changes?

  • Have you linted your code prior to submission?

  • Have you updated the documentation and README?

  • Is PII treated correctly? In particular, make sure the code is not logging objects or strings that might contain PII (e.g. request headers).

  • Have secrets been stripped before committing?

@margaretmeehan margaretmeehan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I will add this testing option to the Medium post also...

@c-w c-w merged commit cff980e into master Feb 4, 2019
@c-w c-w deleted the receiver-tool branch February 4, 2019 19:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants