Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement message queue #457

Merged
merged 34 commits into from
Dec 7, 2022
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d701fe2
feat: add Kafka and write orders to 'orders' Topic
secustor Oct 17, 2022
a975e1f
feat: add Accountingservice which consumes orders from Kafka
secustor Oct 17, 2022
927ed69
feat: add Frauddetectionservice which consumes orders from Kafka
secustor Oct 26, 2022
ed23f1a
Merge branch 'main' into implement_message_queue
secustor Oct 26, 2022
4bd0962
docs: add documentation for new services
secustor Oct 26, 2022
76b5bbc
docs: fix linting
secustor Oct 26, 2022
1fe2b69
feat: se-/deserialize using protobuf
secustor Oct 27, 2022
e289b03
docs: add service docs for accountingservice and frauddetectionservice
secustor Oct 27, 2022
61f1325
docs: fix linting
secustor Oct 27, 2022
4a82ed6
docs: add changelog
secustor Oct 27, 2022
c2aa434
docs: implement change requests
secustor Oct 31, 2022
cd89bda
refactor: use .env variable for broker ports
secustor Nov 2, 2022
2d98fe5
fix: add slf4j api to prevent warning during java agent initialization
secustor Nov 2, 2022
a65289e
Merge branch 'main' into implement_message_queue
julianocosta89 Nov 10, 2022
61555b2
feat: use KRAFT instead of Kafka with Zookeeper
secustor Nov 11, 2022
de48f63
Merge remote-tracking branch 'origin/implement_message_queue' into im…
secustor Nov 11, 2022
0a3c21a
Merge branch 'main' into implement_message_queue
secustor Nov 11, 2022
64f9089
fix(accountingservice): add protobuf-dev as as build dependency
secustor Nov 13, 2022
9df0b71
Merge branch 'main' into implement_message_queue
secustor Nov 15, 2022
b0281a2
docs: re-add services to architecture graph
secustor Nov 16, 2022
3e440b8
Merge remote-tracking branch 'origin/implement_message_queue' into im…
secustor Nov 16, 2022
3be3a31
Merge branch 'main' into implement_message_queue
secustor Nov 21, 2022
19c124e
Merge branch 'main' into implement_message_queue
secustor Nov 22, 2022
d9cec2b
docs(architecture_graph): rename accounting to accountingservice
secustor Nov 22, 2022
373b8c5
Merge branch 'main' into implement_message_queue
secustor Nov 28, 2022
1acc161
chore: remove licence reference from new services
secustor Nov 28, 2022
28e9637
feat(frauddetection): use eclipse-temurin 17 instead of openjdk 18
secustor Nov 28, 2022
157ded3
Merge branch 'main' into implement_message_queue
julianocosta89 Nov 29, 2022
6e5606e
Merge branch 'main' into implement_message_queue
austinlparker Dec 2, 2022
87c2554
Merge branch 'main' into implement_message_queue
secustor Dec 6, 2022
98ee2fb
minimize log
puckpuck Dec 7, 2022
e6aa7b6
update frauddetectionservice name
puckpuck Dec 7, 2022
e431bc1
add accounting service
puckpuck Dec 7, 2022
85f0e75
use kafka container name with healthchecks
puckpuck Dec 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minimize log
Signed-off-by: Pierre Tessier <pierre@pierretessier.com>
  • Loading branch information
puckpuck committed Dec 7, 2022
commit 98ee2fbbd71f9e82a2bdaea7e4b4d14c2b101bf7
3 changes: 2 additions & 1 deletion src/accountingservice/kafka/consumer.go
Original file line number Diff line number Diff line change
@@ -62,7 +62,8 @@ func (g *groupHandler) ConsumeClaim(session sarama.ConsumerGroupSession, claim s
if err != nil {
return err
}
log.Printf("Message claimed: value = %s, timestamp = %v, topic = %s", string(message.Value), message.Timestamp, message.Topic)

log.Printf("Message claimed: orderId = %s, timestamp = %v, topic = %s", orderResult.OrderId, message.Timestamp, message.Topic)
session.MarkMessage(message, "")

case <-session.Context().Done():
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ fun main(args: Array<String>) {
.fold(totalCount) { accumulator, record ->
val newCount = accumulator + 1
val orders = OrderResult.parseFrom(record.value())
println("Consumed record with key ${record.key()} and value $orders, and updated total count to $newCount")
println("Consumed record with orderId: ${orders.orderId}, and updated total count to: $newCount")
newCount
}
}