cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

datahub custom output adapter callback

0 Kudos
274

I am implementing my own output adapter and it is working normally but I can't find the callback URL to send the client for success publication. I have checked the server URL in publish function but it is the default URL for datahub which is https://localhost:8443/datahub-webapp/v1.Is there something I need to append to the default URL and send it to the client for success publication??

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member333910
Active Participant
0 Kudos

The Custom Output Adapters and its sub-pages provide details on how to implement your own custom adapter. The Publication Completion section is relevant to your question.

For asynchronous processing, you could create a REST endpoint in your code that delegates to this service method. The Data Hub base URL is passed as a String argument to the adapter publish method. You can pass the base URL on to your import client to build the REST URL for the publication completion callback.

0 Kudos

The output adapter is added as a jar in extensions folder how we will create a rest endpoint in the jar,is it applicable to add a war ?

former_member333910
Active Participant
0 Kudos

To be clear, it's not a requirement to create a REST endpoint for your adapter. If you want your adapter to process asynchronously you can register an endpoint which you can use for your adapter callbacks. You add it to your custom extension just like you would any other Spring bean. You will need to annotate your class with @Component and the appropriate JAX-RS annotations.