Skip to content

Commit a087a28

Browse files
Merge #8
8: Revamp command-handling and models r=Jaskaranbir a=Jaskaranbir Co-authored-by: Jaskaranbir <jaskaranbir.dhillon@gmail.com>
2 parents 7e9a908 + 3a40d20 commit a087a28

33 files changed

+2304
-1478
lines changed

.env

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
SERVICE_NAME=agg-userauth-cmd
2-
KAFKA_LOG_PRODUCER_TOPIC=log.sink
32

4-
# ===> Kafka
3+
# ===> Kafka Config
54
KAFKA_BROKERS=kafka:9092
65

7-
KAFKA_CONSUMER_EVENT_GROUP=agg.userauth.cmd.event.1
8-
KAFKA_CONSUMER_EVENT_QUERY_GROUP=agg.userauth.cmd.eq.1
6+
KAFKA_CONSUMER_GROUP_REQUEST=agg.userauth.request.group.1
7+
KAFKA_CONSUMER_TOPIC_REQUEST=agg.userauth.request
98

10-
KAFKA_CONSUMER_EVENT_TOPIC=event.persistence.response
11-
KAFKA_CONSUMER_EVENT_QUERY_TOPIC=esquery.response
12-
KAFKA_PRODUCER_EVENT_TOPIC=event.rns_eventstore.events
13-
KAFKA_PRODUCER_EVENT_QUERY_TOPIC=esquery.request
14-
KAFKA_PRODUCER_RESPONSE_TOPIC=agg.userauth.response
9+
KAFKA_CONSUMER_GROUP_ESRESP=agg.userauth.esresp.1
10+
KAFKA_CONSUMER_TOPIC_ESRESP=esquery.response
1511

16-
# ===> Mongo
12+
KAFKA_PRODUCER_TOPIC_ESREQ=esquery.request
13+
KAFKA_PRODUCER_TOPIC_EVENTS=event.rns_eventstore.events
14+
15+
KAFKA_END_OF_STREAM_TOKEN=__eos__
16+
AGG_BUILDER_TIMEOUT_SEC=5
17+
18+
# ===> Mongo Config
1719
MONGO_HOSTS=mongo:27017
1820
MONGO_USERNAME=root
1921
MONGO_PASSWORD=root
2022

2123
MONGO_DATABASE=rns_projections
22-
MONGO_AGG_COLLECTION=agg_userauth
24+
MONGO_AGG_COLLECTION=agg_userauth_cmd
2325
MONGO_META_COLLECTION=aggregate_meta
2426

25-
MONGO_CONNECTION_TIMEOUT_MS=3000
26-
MONGO_RESOURCE_TIMEOUT_MS=5000
27+
MONGO_CONNECTION_TIMEOUT_MS=5000

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ linters-settings:
1212
check-type-assertions: true
1313
check-blank: true
1414
lll:
15-
line-length: 90
15+
line-length: 100
1616
unparam:
1717
algo: rta

Gopkg.lock

Lines changed: 47 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,20 @@
3333
version = "1.19.0"
3434

3535
[[constraint]]
36-
name = "github.com/TerrexTech/go-commonutils"
37-
version = "3.1.0"
36+
name = "github.com/TerrexTech/agg-userauth-model"
37+
version = "1.0.0"
38+
39+
[[constraint]]
40+
name = "github.com/TerrexTech/go-agg-builder"
41+
version = "2.0.0"
3842

3943
[[constraint]]
40-
name = "github.com/TerrexTech/go-eventspoll"
41-
version = "4.0.0"
44+
name = "github.com/TerrexTech/go-common-models"
45+
version = "2.0.0"
4246

4347
[[constraint]]
44-
name = "github.com/TerrexTech/go-eventstore-models"
45-
version = "4.0.0"
48+
name = "github.com/TerrexTech/go-commonutils"
49+
version = "3.1.0"
4650

4751
[[constraint]]
4852
name = "github.com/TerrexTech/go-kafkautils"
@@ -60,22 +64,26 @@
6064
name = "github.com/joho/godotenv"
6165
version = "1.3.0"
6266

63-
[[constraint]]
64-
name = "github.com/mongodb/mongo-go-driver"
65-
version = "=0.0.14"
66-
6767
[[constraint]]
6868
name = "github.com/onsi/ginkgo"
69-
version = "1.6.0"
69+
version = "1.7.0"
7070

7171
[[constraint]]
7272
name = "github.com/onsi/gomega"
73-
version = "1.4.2"
73+
version = "1.4.3"
7474

7575
[[constraint]]
7676
name = "github.com/pkg/errors"
7777
version = "0.8.0"
7878

79+
[[constraint]]
80+
branch = "master"
81+
name = "golang.org/x/crypto"
82+
83+
[[constraint]]
84+
branch = "master"
85+
name = "golang.org/x/sync"
86+
7987
[prune]
8088
go-tests = true
8189
unused-packages = true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
UserAuth Aggregate - Command
22
---
33

4-
This service handles `delete`, `insert`, and `update` events for UserAuth Aggregate.
4+
This service handles `delete`, `insert`, and `update` commands for UserAuth Aggregate.
55

66
Check included [docker-compose.yaml][0] and [run_test.sh][1] for sample run-configuration for this service.
77

0 commit comments

Comments
 (0)