Hi @ArindamCh,
You can give this a try - it should work even without a publish instance.
Since you just want the agent to send data to a servlet instead of a publish instance, you can use a Forward Distribution Agent and point it directly to your servlet URL.
Here’s a sample config you can start with (org.apache.sling.distribution.agent.impl.ForwardDistributionAgentFactory-my-agent.cfg.json
{
"name": "my-agent",
"enabled": true,
"queue.processing.enabled": true,
"allowed.roots": ["/content"],
"packageImporter.endpoints": ["http://localhost:4502/bin/my-distribution-servlet"],
"requestAuthorizationStrategy.target": "(name=default)",
"transportSecretProvider.target": "(name=default)"
}
Then, add a trigger using JcrEventDistributionTriggerFactory so the agent fires on add/modify/delete events:
{
"path": "/content",
"deep": true
}
Once this is set up, try making a content change - the agent should send a POST request to your servlet.
You can log whatever you receive there into error.log just to confirm the data flow.
If you still see an error under the “Settings” tab, it usually means one of the references (like packageBuilder or requestAuthorizationStrategy) isn’t resolving properly - you can check that under /system/console/components and make sure the dependencies are active.
Santosh Sai

