Skip to content

update aca_entities ref, add publisher and subscriber#321

Open
vkghub wants to merge 7 commits intotrunkfrom
CU_868hqn978
Open

update aca_entities ref, add publisher and subscriber#321
vkghub wants to merge 7 commits intotrunkfrom
CU_868hqn978

Conversation

@vkghub
Copy link
Copy Markdown
Contributor

@vkghub vkghub commented Mar 6, 2026

Ticket: https://app.clickup.com/t/868hqn978

Summary by CodeRabbit

  • New Features
    • Added infrastructure to support retry request handling for SSA-VLP verification processes.

@vkghub vkghub self-assigned this Mar 6, 2026
@vkghub vkghub added the cr-124 CR-124 Hub 24Hr retry label Mar 6, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

This pull request adds event-driven infrastructure for SSA-VLP verification retry handling. The changes introduce paired event classes (RetriesRequested and RetryRequested), corresponding AMQP publishers, and subscribers configured to manage retry requests through an event system.

Changes

Cohort / File(s) Summary
Event Classes
app/event_source/events/fdsh/verifications/ssa_vlp/call_hub/retries_requested.rb, app/event_source/events/fdsh/verifications/ssa_vlp/call_hub/retry_requested.rb
Adds two new event classes inheriting from EventSource::Event, each configured with a publisher_path to route events through the SSA-VLP call hub AMQP channel.
Publishers
app/event_source/publishers/fdsh/verifications/ssa_vlp/call_hub/retries_requested_publisher.rb, app/event_source/publishers/fdsh/verifications/ssa_vlp/call_hub/retry_requested_publisher.rb
Introduces publisher classes that include EventSource::Publisher with AMQP routing key fdsh.verifications.ssa_vlp.call_hub and register corresponding events for publication.
Subscribers
app/event_source/subscribers/fdsh/verification_requests/ssa_vlp/hub_retries_requested_subscriber.rb, app/event_source/subscribers/fdsh/verification_requests/ssa_vlp/hub_retry_requested_subscriber.rb
Adds subscriber classes listening to the AMQP topic with handlers that acknowledge incoming deliveries without processing payload content.

Sequence Diagram

sequenceDiagram
    participant App as Application
    participant Pub as Publishers
    participant AMQP as AMQP Broker
    participant Sub as Subscribers
    
    App->>Pub: Publish Retry Event<br/>(retries_requested or retry_requested)
    Pub->>AMQP: Route via<br/>fdsh.verifications.ssa_vlp.call_hub
    AMQP->>Sub: Deliver Event
    Sub->>Sub: Acknowledge Delivery<br/>(ack delivery_tag)
    Sub-->>App: Acknowledgment Complete
Loading

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested Reviewers

  • saikumar9
  • ymhari

Poem

🐰 Hoppy hops through queues so bright,
Retries dance through AMQP's light,
Publishers and subscribers align,
Events flowing, all is fine! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title refers to updating aca_entities ref and adding publisher/subscriber, which aligns with the changeset that adds event classes, publishers, and subscribers for SSA VLP call hub retry flows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch CU_868hqn978

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vkghub vkghub changed the title update aca_entities ref update aca_entities ref, add publisher and subscriber Mar 6, 2026
@vkghub vkghub added the enhancement New feature or request label Mar 6, 2026
@vkghub vkghub marked this pull request as ready for review March 6, 2026 21:57
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@app/event_source/publishers/fdsh/verifications/ssa_vlp/call_hub/retries_requested_publisher.rb`:
- Around line 12-15: The publisher class RetriesRequestedPublisher registers the
'retries_requested' event but is never invoked; locate the operation or service
that triggers retry logic (where retries are determined for SSA VLP call hub)
and add a producer call to publish the event using the RetriesRequestedPublisher
(invoke the publisher to emit the 'retries_requested' event with the appropriate
payload and metadata), ensuring you pass the expected payload shape and
error/context info; reference the class RetriesRequestedPublisher and its
registered event 'retries_requested' when wiring the publish call so the
publisher is actually used.

In
`@app/event_source/publishers/fdsh/verifications/ssa_vlp/call_hub/retry_requested_publisher.rb`:
- Around line 12-15: The RetryRequestedPublisher class (RetryRequestedPublisher
and its register_event 'retry_requested') is never used; either remove the dead
publisher or wire a producer where the retry should be triggered. To fix, either
delete the RetryRequestedPublisher definition and any associated event schema if
no consumers exist, or add a publish call from the correct retrying flow (call
site that detects retry conditions) that invokes the publisher to emit
'retry_requested' with the appropriate payload; ensure any consumers/subscribers
expecting this event are present and update tests to cover the new publish path.

In
`@app/event_source/subscribers/fdsh/verification_requests/ssa_vlp/hub_retries_requested_subscriber.rb`:
- Around line 9-13: The subscriber currently acks messages immediately in
subscribe(:on_retries_requested) (within the class including
::EventSource::Subscriber[amqp: 'fdsh.verifications.ssa_vlp.call_hub']), which
drops retry batches; change the handler to invoke the same retry workflow used
by the sibling subscribers (e.g., call the retry/failure handler or dispatcher
used by ssa_verification_requested_subscriber and
vlp_verification_requested_subscriber) and only ack after that processing
succeeds, or remove/disable the subscribe(:on_retries_requested) registration
until the retry wiring is implemented; locate this in the file where
subscribe(:on_retries_requested) and ack(delivery_info.delivery_tag) are defined
and replace the silent ack with a call to the retry handler or defer
subscribing.

In
`@app/event_source/subscribers/fdsh/verification_requests/ssa_vlp/hub_retry_requested_subscriber.rb`:
- Around line 9-13: The subscriber currently acks immediately in
subscribe(:on_retry_requested) which drops retries; instead, call the
appropriate handler inside the block (mirror the pattern used in the similar
ssa_vlp_requested subscriber: invoke the handler, rescue and publish/log
failures), and only call ack(delivery_info.delivery_tag) after successful
processing (or in an ensure block to ack after logging failures), keeping the
include ::EventSource::Subscriber[amqp: 'fdsh.verifications.ssa_vlp.call_hub']
and the subscribe(:on_retry_requested) signature intact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a92beec0-7458-40e9-9fbc-d31b916b3053

📥 Commits

Reviewing files that changed from the base of the PR and between 9e46008 and 638c93c.

⛔ Files ignored due to path filters (1)
  • Gemfile.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • app/event_source/events/fdsh/verifications/ssa_vlp/call_hub/retries_requested.rb
  • app/event_source/events/fdsh/verifications/ssa_vlp/call_hub/retry_requested.rb
  • app/event_source/publishers/fdsh/verifications/ssa_vlp/call_hub/retries_requested_publisher.rb
  • app/event_source/publishers/fdsh/verifications/ssa_vlp/call_hub/retry_requested_publisher.rb
  • app/event_source/subscribers/fdsh/verification_requests/ssa_vlp/hub_retries_requested_subscriber.rb
  • app/event_source/subscribers/fdsh/verification_requests/ssa_vlp/hub_retry_requested_subscriber.rb

@saikumar9 saikumar9 enabled auto-merge (squash) March 9, 2026 15:14
Copy link
Copy Markdown
Member

@saikumar9 saikumar9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cr-124 CR-124 Hub 24Hr retry enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants