File tree Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,17 @@ export SNOWSQL_SCHEMA=public
20
20
export RPK_BROKERS=localhost:19092
21
21
export COMPOSE_PROJECT_NAME=grpc-todo-app
22
22
# The redpanda schema registry (internal to docker )
23
- export RP_SCHEMA_REGISTRY_INTERNAL=http://redpanda-0:8081
23
+ export RP_SCHEMA_REGISTRY_INTERNAL=http://redpanda-0:18081
24
+ # The redpanda schema registry (external to docker)
25
+ export SCHEMA_REGISTRY=http://localhost:18081
24
26
# Kafka Connect URL
25
27
export KAFKA_CONNECT_URI=localhost:18083
26
28
# gRPC service port
27
29
export PORT=9090
28
30
# Redpanda Brokers
29
31
export BROKERS="$RPK_BROKERS"
30
32
# Topic to store the Todo
31
- export TOPICS =todo-list
33
+ export TOPIC =todo-list
32
34
# Running environment, typically used for grpcURL
33
35
export ENV=dev
34
36
# The consumer group used while consuming messages
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ An output similar to this,
294
294
295
295
> ** IMPORTANT** : Ensure the required environment variables are set. The following command expects the following variables
296
296
>
297
- > - ` $TOPICS `
297
+ > - ` $TOPIC `
298
298
> - ` $SNOWSQL_ACCOUNT `
299
299
> - ` $TODOAPP_USER `
300
300
> - ` $TODOAPP_USER_RSA_PRIVATE_KEY `
@@ -371,7 +371,7 @@ snowsql -u $TODOAPP_USER \
371
371
--private-key-path=" $DEMO_HOME /keys/rsa_key.p8" \
372
372
--warehouse $SNOWSQL_WAREHOUSE \
373
373
--dbname $TODOAPP_DATABASE \
374
- --variable redpanda_topic=$TOPICS \
374
+ --variable redpanda_topic=$TOPIC \
375
375
--filename " $DEMO_HOME /etc/snowflake/todo_list_query.sql"
376
376
` ` `
377
377
@@ -429,7 +429,7 @@ snowsql -u $TODOAPP_USER \
429
429
--warehouse $SNOWSQL_WAREHOUSE \
430
430
--dbname $TODOAPP_DATABASE \
431
431
--variable todo_warehouse=$SNOWSQL_WAREHOUSE \
432
- --variable topic_name=$TOPICS \
432
+ --variable topic_name=$TOPIC \
433
433
--variable table_name=$TODOS_TABLE \
434
434
--filename " $DEMO_HOME /etc/snowflake/dynamic_table.sql"
435
435
` ` `
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ func main() {
42
42
config := config .New ()
43
43
client , err := kgo .NewClient (
44
44
kgo .SeedBrokers (config .Seeds ... ),
45
- kgo .ConsumeTopics (config .Topics ... ),
45
+ kgo .ConsumeTopics (config .Topic ),
46
46
kgo .DefaultProduceTopic (config .DefaultProducerTopic ()),
47
47
kgo .ConsumerGroup (config .ConsumerGroupID ),
48
48
kgo .AllowAutoTopicCreation (),
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type Config struct {
11
11
ConsumerGroupID string `env:"CONSUMER_GROUP_ID"`
12
12
Port uint16 `env:"PORT" envDefault:"9090"`
13
13
Seeds []string `env:"BROKERS" envSeparator:"," envDefault:"localhost:19092"`
14
- Topics [] string `env:"TOPICS" envSeparator:"," `
14
+ Topic string `env:"TOPIC" `
15
15
SchemaRegistry string `env:"SCHEMA_REGISTRY" envDefault:"localhost:18081"`
16
16
SchemaURL string `env:"SCHEMA_URL" envDefault:"https://raw.githubusercontent.com/kameshsampath/demo-protos/main/todo/todo.proto"`
17
17
}
@@ -36,5 +36,5 @@ func New() *Config {
36
36
37
37
// DefaultProducerTopic gets the default topic that will be used as the producer topic
38
38
func (c * Config ) DefaultProducerTopic () string {
39
- return c .Topics [ 0 ]
39
+ return c .Topic
40
40
}
Original file line number Diff line number Diff line change 1
- version : " 3.7"
2
1
name : grpc-todo-app
3
2
networks :
4
3
_network :
@@ -124,7 +123,7 @@ services:
124
123
environment :
125
124
- PORT=9090
126
125
- BROKERS=redpanda-0:9092
127
- - TOPICS =todo-list
126
+ - TOPIC =todo-list
128
127
- ENV=dev
129
128
- CONSUMER_GROUP_ID=grpc-todo-app
130
129
- SCHEMA_REGISTRY=redpanda-0:8081
Original file line number Diff line number Diff line change 3
3
"config" : {
4
4
"connector.class" : " com.snowflake.kafka.connector.SnowflakeSinkConnector" ,
5
5
"tasks.max" : " 8" ,
6
- "topics" : " ${TOPICS }" ,
7
- "snowflake.topic2table.map" : " ${TOPICS }:${TODO_LIST_TABLE}" ,
6
+ "topics" : " ${TOPIC }" ,
7
+ "snowflake.topic2table.map" : " ${TOPIC }:${TODO_LIST_TABLE}" ,
8
8
"buffer.count.records" : " 10" ,
9
9
"buffer.flush.time" : " 10" ,
10
10
"buffer.size.bytes" : " 500" ,
You can’t perform that action at this time.
0 commit comments