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 apiVersion: actions.io/v1alpha1
kind: Component kind: Component
metadata: metadata:
name: sith name: sample
spec: spec:
type: bindings.kafka type: bindings.kafka
metadata: metadata:
- name: topics - name: topics
value: sith value: sample
- name: brokers - name: brokers
value: 10.0.181.114:9092 value: 10.0.181.114:9092
- name: consumerGroup - name: consumerGroup
value: group1 value: group1
- name: publishTopic - name: publishTopic
value: sith value: sample

View File

@ -10,7 +10,7 @@ services:
- "9092:9092" - "9092:9092"
environment: environment:
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1 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 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock

View File

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

View File

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

View File

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

View File

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