Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rmohr/camel-hystrix-endpoint
Camel endpoint which wraps child endpoints into a synchronous hystrix circuit breaker
https://github.com/rmohr/camel-hystrix-endpoint
Last synced: 14 days ago
JSON representation
Camel endpoint which wraps child endpoints into a synchronous hystrix circuit breaker
- Host: GitHub
- URL: https://github.com/rmohr/camel-hystrix-endpoint
- Owner: rmohr
- License: apache-2.0
- Created: 2015-05-08T05:26:05.000Z (over 9 years ago)
- Default Branch: develop
- Last Pushed: 2015-07-07T06:39:12.000Z (over 9 years ago)
- Last Synced: 2024-10-11T14:41:20.688Z (about 1 month ago)
- Language: Java
- Size: 111 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# camel-hystrix-endpoint
[![Build Status](https://travis-ci.org/jollydays/camel-hystrix-endpoint.svg?branch=master)](https://travis-ci.org/jollydays/camel-hystrix-endpoint)
Camel endpoint which wraps child endpoints into a synchronous hystrix circuit breaker.
This project allows easy integration of hystrix components into camel routes. A very simple example might look like this:
```java
private class TestRoute extends RouteBuilder {@Override
public void configure() throws Exception {
onException(HystrixRuntimeException.class).handled(true).setBody().constant("error");
from("direct:start").to("hystrix:mock:protectedRoute?hystrixGroup=test?hystrixCommand=slowCommand");
}
}
```
In this example the mock endpoint is protected by a hystrix endpoint by prefixing the mock endpoint with __hystrix__.
The _hystrixGroup_ parameter can be used to identify and group hystrix commands for monitoring in scaled environments.
The _hystrixCommand_ parameter can be used to identify hystrix commands for distributed configuration of components.When wrapping __direct__ endpoints with the hystrix component, whole sections of a route can be protected, including processors and endpoints:
```java
private class TestRoute extends RouteBuilder {@Override
public void configure() throws Exception {
onException(HystrixRuntimeException.class).handled(true).setBody().constant("error");
from("direct:start").to("hystrix:direct:protectedRoute?hystrixGroup=test&hystrixCommand=slowCommand");
from("direct:protectedRoute").marsha().json().to("mock:result");
}
}
```Binaries
Jars for Maven, Ivy, Gradle and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.jollydays.camel%22%20AND%20a%3A%22camel-hystrix-endpoint%22).
Example for Maven:
```xml
com.jollydays.camel
camel-hystrix-endpoint
x.y.z```