Enabling Asynchronous Support in Sling Servlet/OSGi Service for Parallel Processing of Multiple APIs | Community
Skip to main content
Sh1ju
New Participant
July 24, 2023
Solved

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

  • July 24, 2023
  • 2 replies
  • 1121 views

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.

2 replies

ManviSharma
Employee
July 25, 2023

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.
DPrakashRaj
DPrakashRajAccepted solution
New Participant
July 24, 2023