Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dylibso/xtp-kafka-demo
Pluggable Stream Processing with Kafka + XTP
https://github.com/dylibso/xtp-kafka-demo
chicory connect financial-analysis java kafka stream webassembly xtp
Last synced: 15 days ago
JSON representation
Pluggable Stream Processing with Kafka + XTP
- Host: GitHub
- URL: https://github.com/dylibso/xtp-kafka-demo
- Owner: dylibso
- Created: 2024-10-02T17:28:12.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-15T17:10:58.000Z (about 1 month ago)
- Last Synced: 2024-11-15T18:21:18.707Z (about 1 month ago)
- Topics: chicory, connect, financial-analysis, java, kafka, stream, webassembly, xtp
- Language: Java
- Homepage: https://www.getxtp.com/blog/pluggable-stream-processing-with-xtp-and-kafka
- Size: 2.61 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An XTP + Kafka example project
## Requirements
- XTP CLI
- JDK 17+
- Docker (or similar) for the Kafka test container## Structure
- **plugins** contains the XTP plugins
- **app** contains the Quarkus application.## Building Plugins
- Each plugin is in its own folder under `plugins`
- Customize their `xtp.toml` with:```
app_id = ""
bin = "dist/plugin.wasm"
extension_point_id = ""
````app_id` and `extension_point_id` for your own app
- Build each plug-in with `xtp plugin build` or run `make` from the top directory (`plugins`)## Building and Starting the Java Service
Create a `.env` file in the root of the `app` directory with the following contents:
```
xtp.token=
xtp.guest-key=
xtp.extension-point=
xtp.user=
```The user ID is a string that looks like `usr_`
### Building
```
cd app
./mvnw verify
```### Starting
```
cd app
./mvnw quarkus:dev
```The Quarkus DevTools will automatically start and shutdown a
Kafka broker listening on `localhost:9092`.### Building a Self-Contained App
```
cd app
./mvnw package
```Start with:
```
java -jar target/quarkus-app/quarkus-run.jar
```Make sure that a local Kafka instance is listening on `localhost:9092`.
### Building a Native Image
```
cd app
./mvnw package -Dnative
```Start with:
```
./target/quarkus-xtp-kafka-demo-1.0.0-SNAPSHOT-runner
```Make sure that a local Kafka instance is listening on `localhost:9092`.