https://github.com/alainpham/quarkus-kafka-camel-servlet
Wiring together camel-core with xml routes, camel-servlet and smallrye-reactive-messaging-kafka within quarkus
https://github.com/alainpham/quarkus-kafka-camel-servlet
Last synced: 2 months ago
JSON representation
Wiring together camel-core with xml routes, camel-servlet and smallrye-reactive-messaging-kafka within quarkus
- Host: GitHub
- URL: https://github.com/alainpham/quarkus-kafka-camel-servlet
- Owner: alainpham
- Created: 2019-07-05T07:35:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-05T11:40:28.000Z (almost 6 years ago)
- Last Synced: 2025-01-27T07:42:28.514Z (4 months ago)
- Language: HTML
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# Wiring together camel-core camel-servlet and smallrye-reactive-messaging-kafka within Quarkus
This project show how to :
- Configure Camel Servlet extension to Undertow http endpoint provided by Quarkus
- Wire a SmallRye emitter to the camel-context for Camel to send message to kafka
- Wire a Camel producer template to a SmallRye incoming annotated method for Camel to receive messages from KafkaMore details here Link to blog article.
Compile natively
```
mvn package -Pnative
```Create container image
```
docker build -f src/main/docker/Dockerfile.native -t quarkus/quarkus-kafka-camel-servlet .
```Create adjust docker compose image with customized environment props. The following command will help you convert prop files into environment variable standard.
```
cat src/main/resources/application.properties | awk -F= '{gsub("\\.|-","_",$1) ;print "export " toupper($1) "=" $2 }'
```To run everything (Kafka + Project) locally :
```
docker-compose up
```You can get the container image here
https://hub.docker.com/r/alainpham/quarkus-kafka-camel-servlet
To test it
```
curl http://localhost:8080/camel/send -X POST -H "Content-Type: text/plain" -d 'Hello there!!'
```