-
Notifications
You must be signed in to change notification settings - Fork 0
Fixes: Refactored message queue to handle consuming of requests. #147
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: aniebietafia <aniebietafia87@gmail.com>
WalkthroughIntroduces a root “start” API controller, switches email verification to asynchronous RabbitMQ handling with a new queue consumer, updates event publishing to use convertAndSend with type/correlation headers, adjusts OCR listener to consume payload + correlationId, extends RabbitMQ class mapping for OCR events, and simplifies the runtime Docker image. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant API as Application (Auth)
participant Tmpl as AuthEmailTemplateService
participant MQ as RabbitMQ Exchange/Queue
participant Cons as EmailQueueConsumer
participant Mail as EmailOrchestratorService
User->>API: Register / triggers verification
API->>Tmpl: prepareVerificationEmail(...)
Tmpl-->>API: EmailMessage
API->>MQ: publish EmailMessage
note over MQ: Message enqueued for async processing
Cons-->>MQ: @RabbitListener consume
Cons->>Mail: sendEmail(EmailMessage)
Mail-->>Cons: result
Cons-->>MQ: ack or rethrow on failure
sequenceDiagram
autonumber
participant Pub as EventPublisherService
participant MQ as RabbitMQ Exchange/Queue
participant OCR as OcrMessageListener
participant Svc as OcrService
Pub->>MQ: convertAndSend(payload)\n(set __TypeId__, correlationId)
MQ-->>OCR: deliver message
OCR->>Svc: processOcrRequest(payload, correlationId)
Svc-->>OCR: success/failure
alt failure
OCR-->>MQ: rethrow -> retry/DLQ
else success
OCR-->>MQ: ack
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free 📒 Files selected for processing (8)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2024.2.5
with:
upload-result: true Contact Qodana teamContact us at qodana-support@jetbrains.com
|
|
Summary by CodeRabbit