Announcement Announcement Module
Collapse
No announcement yet.
Concurrent calls to ws:outbound-gateways and handling of fault messages Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Concurrent calls to ws:outbound-gateways and handling of fault messages

    Hi,

    I have a searchRequest object that consists of a list of search objects. Each of the search objects contains search data and a property that describes which search destinations the search object should be sent to. I need to add concurrency and a sound error handling mechanism so that I can show the results that did return in addition to showing an error list describing which calls that failed.

    Ideally I want a caller thread that waits for each of its spawned threads to return and then gather the results and failures to the response channel of a gateway.

    Any pointers?

    Example of structure

    SearchRequest
    - Search object 1
    - Search destination 1
    - Search destination 2
    - Search object 2
    - Search destination 2
    - Search destination 3
    I have implemented the following in Spring Integration:

    Request
    SearchGateway > SearchSplitter (splits on the different search objects and sends to an executor channel for concurrency on the different search objects) > Search Router (routes to the destinations described in each search object and uses an executor channel for concurrency on the different search destinations) > Transformer > outbound gateway

    Response
    Outbound gateway > Transformer > Aggregator > SearchGateway

    The search gateway looks like this:

    Code:
    @Gateway(requestChannel = ”searchOutputChannel”, replyChannel = ”searchAggregatedInputChannel”)
    SearchReponse search(SearchRequest searchRequest)

  • #2
    I think my question is if it is possible to combine concurrency with a synchronous gateway with a request and response channel? If so, how do I gather the results and error responses from the different gateways so that I can present them to the user.

    Thanks

    /Kurt

    Comment

    Working...
    X