updated topic name

This commit is contained in:
unknown 2019-10-03 13:58:53 -07:00
parent 6c46e83035
commit 9340d7624f
6 changed files with 10 additions and 10 deletions

View File

@ -1,15 +1,15 @@
apiVersion: actions.io/v1alpha1
kind: Component
metadata:
name: sith
name: sample
spec:
type: bindings.kafka
metadata:
- name: topics
value: sith
value: sample
- name: brokers
value: 10.0.181.114:9092
- name: consumerGroup
value: group1
- name: publishTopic
value: sith
value: sample

View File

@ -10,7 +10,7 @@ services:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
KAFKA_CREATE_TOPICS: "sith:1:1"
KAFKA_CREATE_TOPICS: "sample:1:1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock

View File

@ -8,7 +8,7 @@ app.use(bodyParser.json());
const port = 3000;
app.post('/sith', (req, res) => {
app.post('/sample-topic', (req, res) => {
console.log("Hello from Kafka!");
console.log(req.body);
res.status(200).send();

View File

@ -1,12 +1,12 @@
apiVersion: actions.io/v1alpha1
kind: Component
metadata:
name: sith
name: sample-topic
spec:
type: bindings.kafka
metadata:
- name: topics
value: sith
value: sample-topic
- name: brokers
value: localhost:9092
- name: consumerGroup

View File

@ -2,7 +2,7 @@ import time
import requests
import os
actions_url = "http://localhost:5000/v1.0/bindings/sith"
actions_url = "http://localhost:5000/v1.0/bindings/sample-topic"
n = 0
while True:
n += 1

View File

@ -1,11 +1,11 @@
apiVersion: actions.io/v1alpha1
kind: Component
metadata:
name: sith
name: sample-topic
spec:
type: bindings.kafka
metadata:
- name: brokers
value: localhost:9092
- name: publishTopic
value: sith
value: sample-topic