Slaesforce FAQ

how to specify salesforce config in camel-context.xml

by Drew Runolfsdottir Jr. Published 3 years ago Updated 2 years ago
image

What is a context component in camel?

Since Camel 2.7 The context component allows you to create new Camel Components from a CamelContext with a number of routes which is then treated as a black box, allowing you to refer to the local endpoints within the component from other CamelContexts.

What are the options available in the camelcontext component?

The Camel Context component has no options. with the following path and query parameters: Required Is the ID you used to register the CamelContext into the Registry. Required Can be a valid Camel URI evaluated within the black box CamelContext. Or it can be a logical name which is mapped to any local endpoints.

Is there a way to remove the context prefix from camelcontext?

Or you can omit the "context:" prefix. The Camel Context component has no options. with the following path and query parameters: Required Is the ID you used to register the CamelContext into the Registry. Required Can be a valid Camel URI evaluated within the black box CamelContext.

How to get API limits from Salesforce?

With salesforce:limits operation you can fetch of API limits from Salesforce and then act upon that data received. The result of salesforce:limits operation is mapped to org.apache.camel.component.salesforce.api.dto.Limits class and can be used in a custom processors or expressions.

image

Defining the context component

First you need to create a CamelContext, add some routes in it, start it and then register the CamelContext into the Registry (JNDI, Spring, Guice or OSGi etc).

Using the context component

Then in another CamelContext we can then refer to this "accounts black box" by just sending to accounts:purchaseOrder and consuming from accounts:invoice.

Naming endpoints

A context component instance can have many public input and output endpoints that can be accessed from outside it’s CamelContext. When there are many it is recommended that you use logical names for them to hide the middleware as shown above.

Configuring Components and Endpoints

You can configure your Component or Endpoint instances in your Spring XML as follows in this example.

Using package scanning

Camel also provides a powerful feature that allows for the automatic discovery and initialization of routes in given packages. This is configured by adding tags to the camel context in your spring context definition, specifying the packages to be recursively searched for RouteBuilder implementations.

Using context scanning

You can allow Camel to scan the container context, e.g. the Spring ApplicationContext for route builder instances. This allow you to use the Spring <component-scan> feature and have Camel pickup any RouteBuilder instances which was created by Spring in its scan process.

image
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9