Hello
We would like to execute a search from a Java Microservice when a JmsListener triggers.
@JmsListener(destination = "indexDataChanged")
Depending on the changed document, we need to execute a search and do something with the found objects. I thought I can use a FeignClient for this as follows:
@FeignClient(name = "search")
public interface SearchClient {
@RequestMapping(method = POST, value = "/search")
Map<String, Object> search(@RequestBody Map<String, Object> request);
}
But sadly this always returns a 401, probably because the JmsListener does not have an authentication header. I cannot use DMS FeignClient
@RequestMapping(method = GET, value = "/rest-ws/service/result/query")
as I need to search for a complex field (table column) and this is not supported by the DMS Endpoint. I also tried to add the search endpoint to the list of authentication.exposed.endpoints as follows:
authentication.exposed.endpoints: '/enaio/client/**,/enaio/custom/**,/search/**'
but I could not log in to the client anymore after a restart of the gateway. This would probably not be an option in production anyways.
Could you please advise me on how to execute a search on complex fields from a Microservice which is not triggered by a JMSListener?
Kind regards,
Nicole