apache / openwhisk-package-kafka

Apache OpenWhisk package for communicating with Kafka or Message Hub
https://openwhisk.apache.org/
Apache License 2.0
32 stars 43 forks source link

perform credentials check before creating consumer #256

Closed abaruni closed 4 years ago

abaruni commented 6 years ago

there are two changes here:

1) Perform a check of the messagehub credentials (if it is messagehub) and topic. This is to ensure that the authkey and topic provide when the trigger was originally created are still valid. there is the possibility that credentials and/or a topic could be deleted without the trigger being deleted. this leaves around zombie consumers who never stop attempting to connect to a broker. the idea here is to do the check when creating a consumer for an active trigger. if the authkey and topic are valid, then we will create the consumer as usual. if either are invalid. then the consumer will not be created and the trigger will be disabled in the db. if encounter any errors while trying to validate, then we'll retry. if at the end of the alloted retries, we don't succeed in getting either a 200 or 403, then we'll treat it as though we did get a 200. the motivation being that we'll eventually catch it on subsequent deploys. better to err on the side of caution than to mistakenly disable a valid trigger

2) do not create consumers for disabled triggers

dgrove-oss commented 4 years ago

Closing as abandoned