Questo contenuto non è disponibile nella lingua selezionata.

Chapter 263. 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>

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

263.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");
  • Spring Boot

    application.properties

    camel.cloud.ribbon.properties[ServerListRefreshInterval] = 250

    routes

    from("direct:start")
        .serviceCall()
            .name("myService")
            .ribbonLoadBalancer()
            .consulServiceDiscovery()
            .end()
        .to("mock:result");

  • XML

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

263.2. See Also

Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni sulla documentazione di Red Hat

Legal Notice

Theme

© 2026 Red Hat
Torna in cima