28 Şubat 2021 Pazar

Camel TimerComponent Sınıfı

Örnek
Şöyle yaparız
import org.apache.camel.builder.RouteBuilder;
import org.springframework.stereotype.Component;

@Component
public class RestAPIClientRoute extends RouteBuilder {
  @Override
  public void configure() throws Exception {
    restConfiguration().host("dummy.restapiexample.com").port(80);
    
    from("timer:rest-client?period=10s")
      .to("rest:get:/api/v1/employees")
      .log("${body}");
  }
}

Hiç yorum yok:

Yorum Gönder