Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10286

Allow async bean method in bean language with J8 CompletableFuture

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.18.0
    • Component/s: camel-core
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown
    • Flags:
      Patch

      Description

      Allow easy creation of asyncrhonous methods called from bean language.
      Proposed solution is to allow such methods to return CompletableFuture.

      Such return would automatically be treated as async invocation.
      Non-null result will be used as resulting body.
      Any async exception will be propagated to proper error handling.

      Note that if CompletableFuture would return null, it won't be used as resulting body. Rather resulting body will not be changed. It would help in use cases when processing method just does some work and returns CompletableFuture<Void>.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                tivv Vitalii Tymchyshyn
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: