Merge branch 'dev' into 'staging'

feat: details to init kafka topics log

See merge request pena-services/customer!7
This commit is contained in:
Kirill 2023-07-07 10:38:11 +00:00
commit fc179d9404

@ -66,7 +66,7 @@ func Initialize(ctx context.Context, brokers, topics []string) error {
for _, topic := range topics {
isExist, err := kafka.TopicExists(ctx, topic)
if err != nil {
lastInitializeErr = fmt.Errorf("failed to check is topic <%s> exist on <Initialize> of <BrokerService>: %w", topic, err)
lastInitializeErr = fmt.Errorf("failed to check is topic <%s> exist on brokers <%+q>: %w", topic, brokers, err)
continue
}
@ -75,7 +75,7 @@ func Initialize(ctx context.Context, brokers, topics []string) error {
}
if err := kafka.CreateTopic(ctx, topic); err != nil {
lastInitializeErr = fmt.Errorf("failed to create topic <%s> on <Initialize> of <BrokerService>: %w", topic, err)
lastInitializeErr = fmt.Errorf("failed to create topic <%s> on brokers <%+q>: %w", topic, brokers, err)
}
}