-
Notifications
You must be signed in to change notification settings - Fork 5.2k
feat/add global SQS mode with single-queue-per-event and payload size control #1896
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
feat/add global SQS mode with single-queue-per-event and payload size control #1896
Conversation
Reviewer's GuideThis PR enhances SqsController by adding a global SQS mode with unified queue provisioning, refactoring event routing and queue management to use a common prefix, enforcing payload size validation with S3 fallback for oversized messages, updating FIFO queue deduplication, and extending environment configuration to support new SQS global flags and server metadata. Sequence diagram for SQS message publishing with S3 fallback for large payloadssequenceDiagram
participant SqsController
participant SQS
participant S3Service
actor Logger
SqsController->SQS: sendMessage(message)
alt Payload size <= MAX_PAYLOAD_SIZE
SQS->SqsController: Message accepted
SqsController->Logger: Log success
else Payload size > MAX_PAYLOAD_SIZE & S3 enabled
SqsController->S3Service: uploadFile(message)
S3Service->SqsController: fileUrl
SqsController->SQS: sendMessage({dataType: 's3', data: {fileUrl}})
SQS->SqsController: Message accepted
SqsController->Logger: Log success
else Payload size > MAX_PAYLOAD_SIZE & S3 disabled
SqsController->Logger: Log error (payload too large)
end
Class diagram for updated SqsController queue management and event routingclassDiagram
class SqsController {
+init(): Promise<void>
+set(instanceName: string, data: EventDto): Promise<any>
+sendData(instanceName: string, event: string, data: any, ...): void
+saveQueues(prefixName: string, events: string[], enable: boolean)
+listQueues(prefixName: string)
+removeQueuesByInstance(prefixName: string)
-sqs: SQS
-logger
-monitor
-prisma
-configService
}
SqsController <|-- EventController
SqsController --> SQS
SqsController --> S3Service
SqsController --> ConfigService
SqsController --> Logger
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
|
Please fix the lint with |
Introduce a global SQS configuration mode with unified queue provisioning and event routing, add large-payload handling via S3 fallback, and enhance queue management abstractions in SqsController.
New Features:
Enhancements:
Build:
Summary by Sourcery
Implement a global SQS configuration mode with unified queue management and add large-payload handling via S3 fallback, while refactoring SqsController to simplify dynamic queue routing and message handling.
New Features:
Enhancements:
Build: