...
Example of request body:
{
"value" : "order 123 is created",
"eventType" : "order_created"
}
Required environment variables:
KAFKA_HOST - host of kafka server
KAFKA_PORT - port of kafka server
DeploymentDescriptor.json example:
Code Block | ||||
---|---|---|---|---|
| ||||
{
"srvcId": "mod-pub-sub-poc-1.0.0-SNAPSHOT",
"nodeId": "10.0.2.15",
"descriptor": {
"dockerImage": "test-kafka-my:latest",
"dockerPull": false,
"env": [
{
"name": "KAFKA_HOST",
"value": "10.0.2.15"
},
{
"name": "KAFKA_PORT",
"value": "29092"
},
{
"name": "JAVA_OPTIONS",
"value": "-Xmx256m"
}
],
"dockerArgs": {
"HostConfig": {
"PortBindings": {
"8081/tcp": [
{
"HostPort": "%p"
}
]
}
}
}
}
}
|
Useful links:
https://kafka.apache.org/documentation/ - Kafka documentation
...