You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Spring Integration Component

The spring-integration: component provides a bridge for Camel components to talk to spring integration endpoints.

URI format

spring-integration:defaultChannelName[?options]

Where defaultChannelName represents the default channel name which is used by the Spring Integration Spring context. It will equal to the inputChannel name for the Spring Integration consumer and the outputChannel name for the Spring Integration provider.

Options

Name

Description

Example

Required

default value

inputChannel

The spring integration input channel name this endpoint wants to consume from that is defined in the spring context

inputChannel=requestChannel

No

 

outputChannel

The spring integration output channel name to send message to the spring integration context

outputChannel=replyChannel

No

 

inOut

The exchange pattern that spring integration endpoint should use

inOut=true

No

inOnly for the spring integration consumer and outOnly for the spring integration provider

consumer.delay

Delay in millis between each poll

consumer.delay=60000

No

500

consumer.initialDelay

Millis before polling starts

consumer.initialDelay=10000

No

1000

consumer.userFixedDelay

true to use fixed delay between pools, otherwise fixed rate is used. See ScheduledExecutorService in JDK for details.

consumer.userFixedDelay=false

No

false

Usage

Spring Integration component is a bridge which connects Spring Integration endpoints through the Spring integration's input and output channels with the Camel endpoints. In this way, we can send out the Camel message to Spring Integration endpoints or receive the message from Spring Integration endpoint in Camel routing context.

Examples

Using the Spring Integration Endpoint

You could setup the Spring Integration Endpoint by using the URI

Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException

or by the Spring Integration Channel name

Error formatting macro: snippet: java.lang.NullPointerException

The Source and Target adapter

Spring Integartion also provides the Spring Integration's Source and Target adapters which could route the message from the Spring Integration channel to a camel context endpoint or from a camel context endpoint to a Spring Integration Channel.

Here is the name spaces header

Error formatting macro: snippet: java.lang.NullPointerException

Now you could bind your source or target to camel context endpoint

Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
  • No labels