Components in Alphabetical Order

Below, we present the components with their descriptions, functions, and examples, organized in alphabetical order.

Azure Storage Blob Service

  • Description: Azure Storage Blob Service is used to store and retrieve blobs (binary large objects) from the Azure Storage Blob service using Azure APIs v12.

  • Function: trigger and connector.

  • Example as a connector

    • The flow starts when a POST request is made to the endpoint /hello.

    • Then it lists (operation: "listBlobs") all the blobs stored in the myblobcontainer container of the camelstorageaccount01 storage account on Azure.

    • Authentication is performed using a shared access key.

    • After listing, the flow logs the obtained information.

Script

Diagram

- from:
    uri: "rest:post:/hello"
    steps:
    - to:
        uri: "azure-storage-blob://camelstorageaccount01/myblobcontainer"
        parameters:
          credentialType: "SHARED_ACCOUNT_KEY"
          operation: "listBlobs"
          accessKey: "RAW(**chave de acesso**)"
    - to:
        uri: "log:myLogger"
component azure storage blob service

AWS Lambda

  • Description: the AWS Lambda component supports AWS Lambda functions: create, get, list, delete, and invoke.

  • Function: connector.

  • Example

    • In the flow, a POST request is received at the endpoint /hello, triggering a sequence of actions.

    • First, the flow logs a message indicating that the request has been received.

    • Then, it invokes a specific function in AWS Lambda (operation: "invokeFunction"), using access credentials (access key and secret key) for authentication.

    • After invoking the Lambda function, a new message is logged.

Script

Diagram

- from:
    uri: "rest:post:/hello"
    steps:
    - to:
        uri: "log:myLogger"
    - to:
        uri: "aws2-lambda://sensedia-integration-camel-poc-lambda"
        parameters:
          accessKey: "****"
          secretKey: "****"
          operation: "invokeFunction"
    - to:
        uri: "log:myLogger"
component aws lambda

AWS S3 Storage Service

  • Description: the AWS S3 Storage Service component allows you to interact with the Amazon S3 service (Simple Storage Service) from AWS and manipulate data in S3 buckets directly through the integration routes.

  • Function: trigger and connector

  • Example as trigger

    • The flow is triggered by new events in an AWS S3 bucket (aws2-s3://bucket-s3).

    • The parameters specify the credentials used (stored in variables) and the bucket’s location.

    • Then, it logs a message with the content of the file or object processed from the bucket.

Script

Diagram

- from:
    uri: "aws2-s3://bucket-s3"
    parameters:
      region: us-east-1
      accessKey: "{{ACCESS_KEY}}"
      secretKey: "{{SECRET_KEY}}"
    steps:
      - log:
          message: "Body: ${body}"
component aws3

AWS Simple Notification System (SNS)

  • Description: the AWS SNS component allows messages to be sent to an Amazon Simple Notification Topic.

  • Function: connector.

  • Example

    • The flow starts with a POST request at the endpoint /hello.

    • When a request is received, a message is sent to a topic in the AWS Simple Notification Service (SNS).

Script

Diagram

- from:
    uri: "rest:post:/hello"
    steps:
    - to:
        uri: "aws2-sns"
        parameters:
          accessKey: "{accessKey}"
          secretKey: "{secretKey}"
          topicNameOrArn: //{sns-arn}
component aws sns

AWS Simple Queue Service (SQS)

  • Description: the AWS SQS component supports sending and receiving messages to the Amazon SQS service.

  • Function: trigger and connector.

  • Example as a connector

    • The flow starts with a POST request at the endpoint /hello.

    • When a request is received, a message is sent to the Amazon SQS service.

Script

Diagram

- from:
    uri: "rest:post:/hello"
    steps:
    - to:
        uri: "aws2-sqs"
        parameters:
          accessKey: "{accessKey}"
          secretKey: "{secretKey}"
          topicNameOrArn: //{sqs-arn}
component aws sqs

Cron

  • Description: the Cron component allows events to be triggered at specific time intervals.

  • Function: trigger.

  • Example: the snippet below configures a route to be executed every 5 minutes, logging a message in the log.

Script

Diagram

- from:
    uri: "cron:0/5 * * * *"
    steps:
      - log:
          message: "Executado a cada 5 minutos"
component cron

FTP

  • Description: the FTP component provides access to remote file systems through FTP and SFTP protocols. It operates only in passive mode.

  • Function: trigger and connector.

  • Example as a trigger

    • The flow connects to an FTP server and downloads text files.

      • The parameters indicate the credentials used for authentication (username and password) and that it should filter and include only files with the .txt extension.

    • Then, it logs the content of these files in a log.

Script

Diagram

- from:
    uri: "ftp://demo.wftpserver.com/download"
    parameters:
      username: "demo"
      password: "demo"
      includeExt: "txt"
    steps:
    - log:
        message: "Downloaded File Content\n: ${body}"
component ftp

FTPS

  • Description: FTPS is a secure version of FTP that adds support for SSL/TLS to encrypt the connection.

  • Function: trigger and connector.

  • Example as a trigger

    • The flow is configured to connect to an FTPS server at demo.wftpserver.com, using the provided credentials (username and password) to download files with the .txt extension.

    • The flow includes a delay of 10 seconds between download attempts and operates in passive mode.

Script

Diagram

- from:
    uri: "ftps:demo.wftpserver.com/download"
    parameters:
      username: "demo"
      password: "demo"
      includeExt: "txt"
      delay: 10000
      passiveMode: true
component ftps

HTTP

  • Description: the HTTP component enables integration with external services via the HTTP protocol, facilitating the sending and receiving of requests and responses. It supports various HTTP methods such as GET, POST, PUT, and DELETE.

  • Function: connector.

  • Example

    • The flow starts by receiving a POST request at the endpoint /hello.

    • Then, the received message is forwarded to the endpoint http://teste.free.beeceptor.com.

Script

Diagram

- from:
    uri: "rest:post:hello"
    steps:
      - to:
          uri: "http://teste.free.beeceptor.com"
component http

HTTPS

  • Description: the HTTPS component is a secure version of HTTP that uses SSL/TLS to encrypt the data transmitted between the client and the server.

  • Function: connector.

  • Example

    • The flow receives a GET request at the endpoint /tracing.

    • It removes a specific header (CamelHttpPath).

    • Then, it makes a request to an API to obtain information about the address corresponding to the specified ZIP code.

Script

Diagram

from:
    uri: "rest:get:/tracing"
steps:
    - removeHeader:
        name: CamelHttpPath
    - to:
        uri: "https://viacep.com.br/ws/113024001/json/"
        parameters:
            bridgeEndpoint: true
component https

JOLT

  • Description: the JOLT allows for transforming and manipulating JSON data declaratively, using specifications defined in JOLT files.

  • Function: connector. component starts with a POST request at the endpoint /jolt-poc.

    • The request body is logged.

    • The flow transforms the request body using a Jolt template located in the template.json file.

      • The parameters inputType: JsonString and outputType: JsonString ensure that the input and output are handled as JSON strings.

      • contentCache: true enables caching of the results.

    • Finally, the flow logs the result of the transformation.

Script

Diagram

- from:
    uri: "rest:post:/jolt-poc"
    steps:
        - log:
            message: "Got body: ${body}"
        - to:
            uri: "jolt:template.json"
            parameters:
                inputType: JsonString
                outputType: JsonString
                contentCache: true
        - log:
            message: "Result: ${body}"
component jolt

JSLT

  • Description: the JSLT component is used to transform data using templates written in JSLT. It processes input information, such as JSON or XML, reorganizing and formatting it according to a model that you define.

  • Function: connector.

  • Example

    • The flow starts with a POST request at the endpoint /hello.

    • The request data is transformed using the JSLT component with the template file expression.jslt.

      • The parameter contentCache=true enables caching of the template content.

    • Finally, the transformed message is logged at the info level.

Script

Diagram

- from:
    uri: "rest:post:/hello"
    steps:
    - to:
        uri: "jslt:classpath:expression.jslt"
        parameters:
          contentCache: true
    - to:
        uri: "log:info"
component jslt

JSONata

  • Description: the JSONata component allows processing and transforming JSON data using the JSONata query language. It enables complex operations such as filtering, transforming, and aggregating data.

  • Function: connector.

  • Example

    • The flow starts with a POST request at the endpoint /jsonata.

    • Then, the content of the request is transformed using a JSONata expression stored in the file expression.jsonata.

    • The parameters indicate that:

      • the results of the transformation can be cached (contentCache: true);

      • the input type for the transformation is a JSON string (inputType: JsonString);

      • the output type will also be a JSON string (outputType: JsonString).

    • After that, the data is sent to an external endpoint uri: https://enzcomwvg2nng.x.pipedream.net via a POST request.

Script

Diagram

- from:
      uri: rest:post:/jsonata
      steps:
        - to:
            uri: jsonata:classpath:expression.jsonata
            parameters:
              contentCache: true
              inputType: JsonString
              outputType: JsonString
        - to:
            uri: https://enzcomwvg2nng.x.pipedream.net
            parameters:
              bridgeEndpoint: true
              httpMethod: POST
component jsonata

JSON Schema Validator

  • Description: the JSON Schema Validator component performs validation of the message body.

  • Function: connector.

  • Example

    • The flow starts when a POST request is received at the endpoint /hello.

    • Then, the JSON validation component is used to check if the request body conforms to the schema defined in the file my-json-schema.json.

Script

Diagram

- from:
    uri: "rest:post:/hello"
    steps:
       - to:
           uri: "json-validator:file:/etc/camel/resources/sensedia-integration-camel-poc-configmap/my-json-schema.json"
component json schema validator

Kafka

  • Description: the Kafka component is used for communication with the Apache Kafka message broker.

  • Function: trigger and connector.

  • Example as a connector

    • The flow starts with a POST request at the endpoint /kafka.

    • The received message is then sent to one or more Kafka topics that match the pattern retry*.

    • The connection to Kafka is made through the specified broker.

      • URI parameters:

        • brokers: "54.207.234.81:38082": specifies the address of the Kafka broker (in this case, 54.207.234.81 on port 38082).

        • topicIsPattern: true: indicates that the topic to which the message is being sent should be interpreted as a pattern, allowing messages to be sent to all topics that match the pattern retry*.

Script

Diagram

- from:
    uri: "rest:post:/kafka"
    steps:
    - to:
        uri: "kafka:retry*"
        parameters:
          brokers: "54.207.234.81:38082"
          topicIsPattern: true
component kafka

Log

  • Description: the Log component is very useful for logging messages during route processing. It allows you to see what is happening in your integrations in real-time, aiding in debugging and monitoring.

  • Function: connector.

  • Example

    • The flow starts with a POST request at the endpoint /hello.

    • It removes the header Exchange.HTTP_PATH from the message.

    • It makes an HTTP call to an external endpoint.

    • Finally, it logs the response from that call.

Script

Diagram

- from:
    uri: "rest:post:hello"
  steps:
    - removeHeader:
        name: Exchange.HTTP_PATH
    - to:
        uri: "http://teste.free.beeceptor.com/xml-request"
        parameters:
          bridgeEndpoint: true
    - to:
        uri: "log:responseLogger"
component log

Mail

  • Description: the Mail component is used for sending and receiving emails. It is often divided into three main protocols:

    • IMAP for accessing and managing emails on the server.

    • POP3 for downloading emails from the server.

    • SMTP for sending emails.

  • Function: trigger and connector.

IMAP/IMAPS

  • Description: IMAP is a protocol used for receiving emails, allowing access to various mail folders and the manipulation of messages directly on the server.

    IMAPS is a secure version of IMAP that transmits data encrypted using SSL/TLS.

  • Example as a trigger: the flow is configured to connect to an email account using the IMAP protocol on the Gmail server (imap.gmail.com) on port 993.

    • URI parameters:

      • The flow uses the provided credentials (username and password) for authentication;

      • It is configured not to delete emails (delete=false);

      • It is set to fetch only unread messages (unseen=true);

      • There is a delay of 60 seconds (delay=60000), meaning it will check for new emails every minute.

    • When a new email is found, the full content of the email is logged.

Script

Diagram

- from:
    uri: "imaps://imap.gmail.com:993"
    parameters:
      username: "yourusername"
      password: "yourpassword"
      delete: false
      unseen: true
      delay: 60000
    steps:
    - to:
        uri: "log:email"
        parameters:
          showAll: true
component imaps

POP3/POP3S

  • Description: POP3 is primarily used for receiving emails from a mail server. In the mail component, it allows Camel to read emails from a POP3 inbox.

    POP3S is a secure version of POP3 that transmits data encrypted using SSL/TLS.

  • Example as a trigger: the code shows a connection to an email server using the secure POP3 protocol (POP3S) to access a Gmail account.

    • URI parameters:

      • username=yourusername: username;

      • password=yourpassword: password;

      • delete=false: specifies that messages should not be deleted from the server after being read;

      • unseen=true: indicates that only messages that have not yet been read should be retrieved;

      • delay=60000: sets a 60-second delay between each attempt to retrieve new messages.

Script

Diagram

- from:
    uri: "pop3s://pop.gmail.com:995"
    parameters:
      username: "yourusername"
      password: "yourpassword"
      delete: false
      unseen: true
      delay: 60000
    steps:
    - to:
        uri: "log:email"
        parameters:
          showAll: true
component pop3s

SMTP/SMTPS

  • Description: SMTP is used for sending emails. In the Camel mail component, SMTP allows Camel to send emails from an SMTP server.

    SMTPS is a secure version of SMTP that transmits data encrypted using SSL/TLS.

  • Example as a connector: when a POST request is received at the endpoint /hello, the flow sends an email through the Gmail SMTP server using a secure connection (SMTPS).

    • URI parameters:

      • username: "yourusername": the username of the Gmail account being used for authentication.

      • password: "yourpassword": the password for the Gmail account.

      • mail.smtp.auth: "auth": this parameter indicates that SMTP authentication should be used.

      • mail.smtp.starttls.enable: "starttls": this parameter enables STARTTLS, a mechanism to upgrade an insecure connection to a secure connection using TLS.

Script

Diagram

- from:
    uri: "rest:post:/hello"
    steps:
    - to:
        uri: "smtps://smtp.gmail.com:465"
        parameters:
          username: "yourusername"
          password: "yourpassword"
          mail.smtp.auth: "auth"
          mail.smtp.starttls.enable: "starttls"
component smtps

Paho

  • Description: the Paho component enables the integration of applications with the MQTT protocol, facilitating communication between devices and systems in Internet of Things (IoT) environments.

  • Function: trigger and connector

  • Example as trigger:

    • The flow begins by subscribing to the sensor/temperature topic on an MQTT broker, using a secure SSL connection at the URL broker.brokername.com:8883.

    • It logs a message with the received content: Got message ${body}.

    • If a message with the content "Sensor data: 24°C" is published on the sensor/temperature topic, the log will record: "Got message Sensor data: 24°C."

Script

Diagram

- from:
    uri: "paho:sensor/temperature"
    parameters:
      brokerUrl: ssl://broker.brokername.com:8883
    steps:
      - log:
          message: "Got message ${body}"
component paho

Paho MQTT5

  • Description: the Paho MQTT5 component enables the integration of applications with the MQTT protocol (version 5), offering advanced messaging features, such as persistent sessions and flow control.

  • Function: trigger and connector

  • Example as a trigger:

  • The flow is identical to the one described for the Paho component, except it uses version 5 of the MQTT protocol.

Script

Diagram

- from:
    uri: "paho-mqtt5:sensor/temperature"
    parameters:
      brokerUrl: ssl://broker.brokername.com:8883
    steps:
      - log:
          message: "Got message ${body}"
component paho mqtt5

Quartz

  • Description: the Quartz component allows scheduling and triggering events based on cron expressions. It enables configuring tasks to be triggered at regular intervals, such as every minute, hour, or day, using standard cron syntax.

  • Function: trigger.

  • Example: a flow is triggered by the Quartz component every hour, precisely at the 59th minute.

Script

Diagram

- from:
    uri: "quartz://test"
    parameters:
      cron: "59 * * * *"
component quartz

REST

  • Description: the REST component allows creating and managing RESTful endpoints, facilitating communication between applications via the HTTP protocol. It enables the definition of routes that respond to HTTP requests (such as GET, POST, PUT, and DELETE), processing data, invoking services, and manipulating information.

  • Function: trigger and connector.

  • Example as a trigger

    • The flow starts with a POST request to /demo.

    • There are no additional parameters, indicating that the default endpoint settings will be used.

Script

Diagram

- from:
      uri: rest:post:/demo
      parameters: {}
component rest

Scheduler

  • Description: the Scheduler component is used to generate message exchanges when a scheduler triggers.

  • Function: trigger.

  • Example: in the snippet below, the URI shows a scheduler named mySchedulerName, which is triggered every 60 seconds.

Script

Diagram

- from:
    uri: "scheduler:mySchedulerName"
    parameters:
        timeUnit: SECONDS
        delay: 60
component scheduler

SFTP

  • Description: the SFTP component provides access to remote file systems through FTP and SFTP protocols. It operates only in passive mode.

  • Function: trigger and connector.

  • Example as a connector

    • The flow in the example is configured to be triggered by a Quartz scheduler, which fires every minute.

    • When the trigger is activated, the message body is set to Hello World.

    • The flow then sends this message as a file named helloworld.txt to an SFTP server at demo.wftpserver.com, on port 2222, in the /upload directory.

Script

Diagram

- from:
    uri: "quartz://ipaas/trigger"
    parameters:
      cron: "* * * * *"
    steps:
    - setBody:
        constant: "Hello World"
    - to:
        uri: "sftp://demo.wftpserver.com:2222/upload"
        parameters:
          username: "demo"
          password: "demo"
          fileName: "helloworld.txt"
          passive: true
component sftp

Slack

  • Description: the Slack component allows you to send messages, notifications, and alerts directly to Slack channels or users from your integration flows.

  • Function: trigger and connector.

  • Example as trigger:

    • The flow listens for messages in the specified Slack channel.

    • The Slack authentication token is included in the parameters.

    • When a message is received, it is captured and logged with its content.

Script

Diagram

- from:
    uri: "slack:#channel"
    parameters:
      token: "your-slack-token"
    steps:
      - log:
          message: "Received message from Slack: ${body}"
component slack

Timer

  • Description: the Timer component is used to generate message exchanges when a timer triggers.

  • Function: trigger.

  • Example: in the snippet below, the URI shows a timer named mytimer, which is triggered every 30 seconds (30,000 milliseconds).

Script

Diagram

- from:
    uri: "timer:mytimer"
    parameters:
      period: 30000
component timer

XSLT

  • Description: the XSLT component is used to transform XML documents using an XSLT stylesheet, allowing data to be converted into different formats or structures.

  • Function: connector.

  • Example

    • The flow starts with a POST request at the endpoint /source-xslt.

    • The EIP toD indicates that the flow should direct execution to a dynamic URI.

    • The route then makes a GET request to the endpoint https://httpbin.org/xml, obtaining an XML response.

    • It then transforms the XML response into JSON using an XSLT file: response_to_json.xslt.

Script

Diagram

- from:
    uri: "rest:post:/source-xslt"
    steps:
      - toD:
          uri: "https://httpbin.org/xml"
          parameters:
            bridgeEndpoint: true
            httpMethod: GET
      - to:
          uri: "xslt:classpath:response_to_json.xslt"
component xslt

XJ

  • Description: the XJ component allows converting XML and JSON documents without the need for intermediate Java objects.

  • Function: connector.

  • Example:

    • The flow starts by receiving a POST request at the /example-xj endpoint.

    • It makes a GET call to https://httpbin.org/xml.

    • It transforms the received XML response into JSON using the XSLT component.

      • The parameter transformDirection: XML2JSON indicates the direction of the transformation, which in this case is from XML to JSON.

    • It converts the JSON into a Java object.

    • Finally, it sets the Content-Type header to application/json to indicate the response type.

Script

Diagram

- from:
    uri: "rest:post:/example-xj"
  steps:
    - toD:
        uri: "https://httpbin.org/xml"
        parameters:
          bridgeEndpoint: true
          httpMethod: GET

    - to:
        uri: "xj:classpath:response_to_json.xslt"
        parameters:
          transformDirection: XML2JSON

    - unmarshal:
        json: {}

    - set-header:
        name: "Content-Type"
        constant: "application/json"
component xj
Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]