Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeantessier/racecar-kafka-test
A simple test of `racecar` gem for Ruby on Rails
https://github.com/jeantessier/racecar-kafka-test
Last synced: about 2 months ago
JSON representation
A simple test of `racecar` gem for Ruby on Rails
- Host: GitHub
- URL: https://github.com/jeantessier/racecar-kafka-test
- Owner: jeantessier
- Created: 2021-03-12T00:42:49.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T21:26:33.000Z (9 months ago)
- Last Synced: 2024-04-24T22:29:46.377Z (9 months ago)
- Language: Ruby
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
A test Kafka consumer that uses the `racecar` gem.
I built it originally to go with my [`micronaut-kafka-test`](https://github.com/jeantessier/micronaut-kafka-test)
app, but you can use it with any Kafka topic.## To Run
> The very first time, or after a `git pull`, don't forget to do:
>
> $ bundle install### Racecar Consumer
To echo a specific topic:
$ KAFKA_TOPIC=your-topic-name-goes-here bin/racecar EchoConsumer
To echo the default `some-topic` topic:
$ bin/racecar EchoConsumer
### Kafka Producer
To write messages to a specific topic:
$ KAFKA_TOPIC=your-topic-name-goes-here bin/rails server
To echo the default `some-topic` topic:
$ bin/rails server
Then, make a `POST` request to [/hello.index](http://localhost:3000/hello/index).
$ http POST :3000/hello/index
$ http POST :3000/hello/index name="Jean Tessier"