-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update service to use v3 of kafka-client-go #126
Conversation
Remove obsolete files Bump go version to 1.17 Fix tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also consider changing the consumer group name.
Right now we're using the name of the pod which means that new consumer group is created for each one started inside Kubernetes. This will quickly lead to a lot of inactive consumer groups in the MSK cluster which is not ideal.
Remove unusued env variable Fix healthcheck return values
79979c0
to
c6ed0b1
Compare
Using the name of the Kubernetes pod as a Kafka Consumer Group ID is fine. The inactive consumer groups will be automatically removed from the Kafka cluster as soon as the offsets.retention.minutes period expires. It defaults to 1 week at the moment. |
d205d08
to
76bccb4
Compare
@@ -27,7 +26,7 @@ func (n NotificationMapper) MapNotification(event ContentMessage, transactionID | |||
UUID := UUIDRegexp.FindString(event.ContentURI) | |||
if UUID == "" { | |||
// nolint:golint | |||
return dispatch.NotificationModel{}, errors.New("ContentURI does not contain a UUID") | |||
return dispatch.NotificationModel{}, fmt.Errorf("ContentURI does not contain a UUID") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Not sure why do you prefer to use fmt.Errorf
without formatting string and not errors.New
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we do it for consistency among services.. I remember getting requested to change errors.New to fmt.Errorf since my first PRs in the team
Remove obsolete files
Bump go version to 1.17
Fix tests
Description
What
Jira Ticket
Updated Kafka Topics Schema
Why
Copy (if there is one) the text of the original Trello/JIRA ticket in here, with a link back to it for the curious.
Anything, in particular, you'd like to highlight to reviewers
Mention here sections of code which you would like reviewers to pay extra attention to .E.g
Would appreciate a second pair of eyes on the test
I am not quite sure how this bit works
Is there a better library for doing x
Scope and particulars of this PR (Please tick all that apply)
This Pull Request follows the rules described in our Pull Requests Guide