Enabling Asynchronous Support in Sling Servlet/OSGi Service for Parallel Processing of Multiple APIs | Community
Skip to main content
Sh1ju
Level 4
Jul 24, 2023 5:13 PM UTC
Solved

Enabling Asynchronous Support in Sling Servlet/OSGi Service for Parallel Processing of Multiple APIs

I'm working on a task where I need to process data from 3-4 third-party APIs asynchronously, or in parallel, and present this data in JSON format via a Sling servlet to the front end. Could anyone provide some guidance on how to enable asynchronous support in a Sling servlet or an OSGi service?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
DPrakashRaj
DPrakashRajAccepted solution
New Participant
Jul 24, 2023 6:58 PM UTC

2 replies

ManviSharma
Employee
Jul 25, 2023 12:40 PM UTC

Hi,

 

To enable asynchronous processing in a Sling servlet or OSGi service:

  1. Use OSGi Declarative Services (DS) with @3214626 to SlingJobExecutor for async logic.
Translate
DPrakashRaj
DPrakashRajAccepted solution
New Participant
Jul 24, 2023 6:58 PM UTC