Skip to content

Commit 0b303e4

Browse files
committed
add kafka-manager #15
1 parent d2e6ee9 commit 0b303e4

File tree

19 files changed

+115
-29
lines changed

19 files changed

+115
-29
lines changed

samples/Notifier/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"EventBus": {
3-
"Brokers": "127.0.0.1:9092"
3+
"Brokers": "kafka-server:9092"
44
},
55
"Logging": {
66
"LogLevel": {

samples/SignalRNotifier/Services/Hubs/ProjectHub.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,19 @@ public async Task Handle(Notifications.TaskCreated notification, CancellationTok
4040
await Clients.All.SendAsync("taskAddedToProjectNotify", notification, cancellationToken);
4141
}
4242

43-
protected override Task ExecuteAsync(CancellationToken cancellationToken)
43+
protected override async Task ExecuteAsync(CancellationToken cancellationToken)
4444
{
45-
Task.Run(() =>
45+
await Task.Run(() =>
4646
{
4747
_logger.LogInformation("[NCK] Start to subscribe to project-created...");
4848
return _eventBus.Subscribe<ProjectCreatedMsg>("project-created");
4949
}, cancellationToken);
5050

51-
Task.Run(() =>
51+
await Task.Run(() =>
5252
{
5353
_logger.LogInformation("[NCK] Start to subscribe to task-created...");
5454
return _eventBus.Subscribe<TaskCreatedMsg>("task-created");
5555
}, cancellationToken);
56-
57-
return Task.CompletedTask;
5856
}
5957
}
6058
}

samples/SignalRNotifier/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"BasePath": "/"
44
},
55
"EventBus": {
6-
"Brokers": "PLAINTEXT://kafka-cp-kafka:9092"
6+
"Brokers": "kafka-server:9092"
77
},
88
"Logging": {
99
"IncludeScopes": false,

samples/SignalRNotifier/k8s/signalrnotifier-dep.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
22
kind: Deployment
33
metadata:
44
name: signalrnotifier-v1
5-
namespace: default
5+
namespace: kafka
66
spec:
77
replicas: 1
88
template:
@@ -19,7 +19,7 @@ spec:
1919
- name: Hosts__BasePath
2020
value: /
2121
- name: EventBus__Brokers
22-
value: PLAINTEXT://kafka-cp-kafka:9092
22+
value: kafka-server:9092
2323
ports:
2424
- containerPort: 5002
2525
resources:

samples/SignalRNotifier/k8s/signalrnotifier-svc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: signalrnotifier
5-
namespace: default
5+
namespace: kafka
66
labels:
77
app: signalrnotifier
88
spec:

samples/TodoApi/appsettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@
4444
"Microsoft": "Information"
4545
}
4646
}
47-
}
47+
},
48+
"AllowedHosts": "*"
4849
}

samples/TodoApi/k8s/todolist-dep.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
22
kind: Deployment
33
metadata:
44
name: todolist-v1
5-
namespace: default
5+
namespace: kafka
66
spec:
77
replicas: 1
88
template:
@@ -19,15 +19,15 @@ spec:
1919
- name: Hosts__BasePath
2020
value: /
2121
- name: EventBus__Brokers
22-
value: PLAINTEXT://kafka-cp-kafka:9092
22+
value: kafka-server:9092
2323
ports:
2424
- containerPort: 5001
25-
#livenessProbe:
26-
# httpGet:
27-
# path: /healthz
28-
# port: 5001
29-
# initialDelaySeconds: 10
30-
# periodSeconds: 5
25+
livenessProbe:
26+
httpGet:
27+
path: /healthz
28+
port: 5001
29+
initialDelaySeconds: 10
30+
periodSeconds: 5
3131
resources:
3232
requests:
3333
memory: "64Mi"

samples/TodoApi/k8s/todolist-svc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: todolist
5-
namespace: default
5+
namespace: kafka
66
labels:
77
app: todolist
88
spec:

samples/WebNotifier/k8s/webnotifier-dep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
22
kind: Deployment
33
metadata:
44
name: webnotifier-v1
5-
namespace: default
5+
namespace: kafka
66
spec:
77
replicas: 1
88
template:

samples/WebNotifier/k8s/webnotifier-svc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: webnotifier
5-
namespace: default
5+
namespace: kafka
66
labels:
77
app: webnotifier
88
spec:

0 commit comments

Comments
 (0)