-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove SNS #68
Remove SNS #68
Conversation
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.
@@ -28,7 +28,6 @@ export const getParameters = async ( | |||
} while (nextToken); | |||
|
|||
if (parameters) { | |||
logger.info('Fetched parameters from Parameter Store'); |
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.
🙏
publishTranscriptionOutputFailure( | ||
snsClient, | ||
config.app.destinationTopicArns.transcriptionService, | ||
await publishTranscriptionOutputFailure( |
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.
good call - it's probably important to await the result of this before updating scale in protection
@@ -79,7 +79,7 @@ export const getConfig = async (): Promise<TranscriptionConfig> => { | |||
const destinationTopic = findParameter( |
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.
destinationQueueUrls
?
messageId: z.string(), | ||
body: stringToJSONSchema.pipe(TranscriptionOutput), |
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.
non-blocking: I'm not sure I understand these changes. output-handler is still reading off of the same sqs queue, right? Why has the shape of the message changed?
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.
This was unexpected for me as well - I had to work out the structure of the new message by printing it out but I think think previously you'd have an sqs message wrapped around an sns notification, whereas now you've got an sqs message wrapped around the message itself.
32bc404
to
0b85e34
Compare
What does this change?
Initially when we started this project we had an idea to have the worker instances post to a single SNS topic which then feeds into multiple sqs topics for different services (giant, composer etc). Later, we decided that we didn't want to mix up output destined for giant with output for the transcription-service-output-handler - we shouldn't share data with services that aren't supposed to be consuming it,
Having SNS provided some benefit of easy email notifications when a worker had finished a transcription, though again for privacy/spam reasons we've switched this off #65
However, when trying to integrate the transcription service with giant I found that using SNS added some complexity:
So, given that we're not getting much benefit out of SNS, this PR removes it from the transcription service
How to test
I've tested this on CODE and verified that transcription still works