update aca_entities ref, add publisher and subscriber#321
update aca_entities ref, add publisher and subscriber#321
Conversation
📝 WalkthroughWalkthroughThis 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
Sequence DiagramsequenceDiagram
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
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
Gemfile.lockis excluded by!**/*.lock
📒 Files selected for processing (6)
app/event_source/events/fdsh/verifications/ssa_vlp/call_hub/retries_requested.rbapp/event_source/events/fdsh/verifications/ssa_vlp/call_hub/retry_requested.rbapp/event_source/publishers/fdsh/verifications/ssa_vlp/call_hub/retries_requested_publisher.rbapp/event_source/publishers/fdsh/verifications/ssa_vlp/call_hub/retry_requested_publisher.rbapp/event_source/subscribers/fdsh/verification_requests/ssa_vlp/hub_retries_requested_subscriber.rbapp/event_source/subscribers/fdsh/verification_requests/ssa_vlp/hub_retry_requested_subscriber.rb
Ticket: https://app.clickup.com/t/868hqn978
Summary by CodeRabbit