Created
March 12, 2023 08:08
-
-
Save ayeshLK/b884b670e31f4d659e596392c3fed2af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createMessageConsumer(websubhub:VerifiedSubscription message) returns kafka:Consumer|error { | |
string groupName = string `${message.hubTopic}_${message.hubCallback}`; | |
kafka:ConsumerConfiguration consumerConfiguration = { | |
groupId: groupName, | |
topics: [message.hubTopic], | |
// turn-off the auto offset commit | |
autoCommit: false | |
}; | |
return check new ("localhost:9092", consumerConfiguration); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment