If Kafka crashes, what happens to event delivery?
Golang
Is a model with JSON tags (e.g., RegisterUserRequest) a domain model? How to properly separate DTO and domain entity?
Are you familiar with Hexagonal Architecture? Tell about its structure.
Hexagonal Architecture consists of three elements: adapter, port, and core application. How is an incoming request processed through the handler to the domain model?
How to implement the reverse side — Inbox pattern on the notification service side? How to ensure idempotency of event processing?
// Fix the code so that the requests are concurrent and the response code is output // and in case of an error - output its log and continue processing package main import "net/http" var addrs = []string{"[link]", "[link]"} func main() { for _, url := range addrs { resp, err := http.Get(url) if err != nil { log.err return } } }
Have you worked with DDD and CQRS? Tell us about it.
// Fix the code so that requests are concurrent and the response code is displayed // and in case of error - log it and continue processing package main import "net/http" var addrs = []string{"[link] "[link] "[link] "[link] "[link] "[link] "[link] func main() { wg := sync.WaitGroup{} data := make(map[string]bool) for _, url := range addrs { wg.Add(1) if !data[url]{ data[url] = true go func(url string){ defer wg.Done() resp, err := http.Get(url) if err != nil { log.err return } log.info }(url) } } wg.Wait() }
In a microservices architecture, each service has its own database. How does the Outbox pattern work in this context if Kafka has not yet received the message?
Tell us about the Transactional Outbox pattern — how does it work and why is it used?
An aggregate always operates at the level of a single transaction. What else is important to know about aggregates in DDD?