Chapter 282. Ribbon Component


Available as of Camel version 2.18

The ribbon component provides use of Netflix Ribbon for client side load balancing.

Maven users will need to add the following dependency to their pom.xml for this component:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-ribbon</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>
Copy to Clipboard Toggle word wrap

This component helps applying load balancing feature at the client side when using ServiceCall EIP.

282.1. Configuration

  • Programmatic

    RibbonConfiguration configuration = new RibbonConfiguration();
    configuration.addProperties("ServerListRefreshInterval", "250");
    
    RibbonLoadBalancer loadBalancer = new RibbonLoadBalancer(configuration);
    
    from("direct:start")
        .serviceCall()
            .name("myService")
            .loadBalancer(loadBalancer)
            .consulServiceDiscovery()
            .end()
        .to("mock:result");
    Copy to Clipboard Toggle word wrap
  • Spring Boot

    application.properties

    camel.cloud.ribbon.properties[ServerListRefreshInterval] = 250
    Copy to Clipboard Toggle word wrap

    routes

    from("direct:start")
        .serviceCall()
            .name("myService")
            .ribbonLoadBalancer()
            .consulServiceDiscovery()
            .end()
        .to("mock:result");
    Copy to Clipboard Toggle word wrap

  • XML

    <route>
        <from uri="direct:start"/>
        <serviceCall name="myService">
            <!-- enable ribbon load balancer -->
            <ribbonLoadBalancer>
                <properties key="ServerListRefreshInterval" value="250"/>
            </ribbonLoadBalancer>
        </serviceCall>
    </route>
    Copy to Clipboard Toggle word wrap

282.2. See Also

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat