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

Create a webhook meta-component

    XMLWordPrintableJSON

    Details

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

      Description

      The intention is to create a meta-component that allows other components to define how they can configure themselves to create push-based consumers by remotely configuring a webhook.

      The way it's used is similar to the master component.

       

      E.g.

      The following route starts from a Telegram polling consumer:

      from("telegram:bots/token")
        .to("log:info")

       

      By prepending the webhook uri prefix, we literally prepend a webhook listener to it:

      from("webhook:telegram:bots/token")
        .to("log:info")

       

      The role of the webhook meta-component is of:

      • Exposing one or more endpoints using the rest consumer factory
      • Running the delegate endpoint in webhook mode (each component defines the specific rules)
      • Registering the webhook at the webhook provider site (specific per component, external URL configurable)
      • Unregistering the webhook at the webhook provider site when it's no more necessary (specific per component)

      So, the meta-component sets up the infrastructure and orchestrates the workflow.

       

      Registration/deregistration should be configurable:

      • In standalone mode, the registration is done at route startup, the deregistration is done at route shutdown
      • In Camel K mode, automatic registration is disabled by default, because the deployment can be scale up/down (especially in Knative mode, where this happens automatically):
        • Camel K will setup a webhook subscription resource that takes care of externally registering/deregistering the webhook when the integration is created/edited/deleted (will use the webhook component API for this)

       

      With this meta-component, in Camel K + Knative mode, we can create integrations from telegram, slack, github, twitter, dropbox, .... that can scale down to 0 when not used.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nferraro Nicola Ferraro
                Reporter:
                nferraro Nicola Ferraro
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m