diff --git a/.gitignore b/.gitignore index 2b1396b..89eb513 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ .gradle build bin -target +target/ _site/ *.swp .idea diff --git a/.travis.yml b/.travis.yml index eda634a..2b1ea1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ before_install: - git config user.email "$GIT_EMAIL" - git config credential.helper "store --file=.git/credentials" - echo "https://$GH_TOKEN:@github.com" > .git/credentials + - gem install asciidoctor install: - mvn --settings .settings.xml install -P docs -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true - ./src/main/asciidoc/ghpages.sh diff --git a/README.adoc b/README.adoc index 0fbce23..fe7eaef 100644 --- a/README.adoc +++ b/README.adoc @@ -1,6 +1,6 @@ // Do not edit this file (e.g. go instead to src/main/asciidoc) -= Spring Platform Bus += Spring Cloud Bus Spring Cloud Bus links nodes of a distributed system with a lightweight message broker. This can then be used to broadcast state changes (e.g. configuration changes) or other management instructions. A key idea is that the Bus is like a distributed Actuator for a Spring Boot application that is scaled out, but it can also be used as a communication channel between apps. The only implementation currently is with an AMQP broker as the transport, but the same basic feature set (and some more depending on the transport) is on the roadmap for other transports. @@ -23,7 +23,7 @@ The bus currently supports sending messages to all nodes listening or all nodes == Building -== Basic Compile and Test +=== Basic Compile and Test To build the source you will need to install http://maven.apache.org/run-maven/index.html[Apache Maven] v3.0.6 or above and JDK 1.7. @@ -55,7 +55,7 @@ demo repository](https://github.com/spring-cloud-samples/scripts) for instructions. For example consider using the "fig.yml" with [Fig](http://www.fig.sh/) to run them in Docker containers. -== Documentation +=== Documentation The spring-cloud-build module has a "docs" profile, and if you switch that on it will try to build asciidoc sources from @@ -66,7 +66,7 @@ parsing or rendering it, just copying it to `${main.basedir}` any changes in the README it will then show up after a Maven build as a modified file in the correct place. Just commit it and push the change. -== Pull Requests +=== Pull Requests Spring Cloud is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github @@ -74,7 +74,7 @@ tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below. -=== Sign the Contributor License Agreement +==== Sign the Contributor License Agreement Before we accept a non-trivial patch or pull request we will need you to sign the https://support.springsource.com/spring_committer_signup[contributor's @@ -84,7 +84,7 @@ accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests. -=== Code Conventions and Housekeeping +==== Code Conventions and Housekeeping None of these is essential for a pull request, but they will all help. They can also be added after the original pull request but before a merge. @@ -113,12 +113,12 @@ http://eclipse.org[Eclipse] when working with the code. We use the http://eclipse.org/m2e/[m2eclipe] eclipse plugin for maven support. Other IDEs and tools should also work without issue. -=== Importing into eclipse with m2eclipse +==== Importing into eclipse with m2eclipse We recommend the http://eclipse.org/m2e/[m2eclipe] eclipse plugin when working with eclipse. If you don't already have m2eclipse installed it is available from the "eclipse marketplace". -=== Importing into eclipse without m2eclipse +==== Importing into eclipse without m2eclipse If you prefer not to use m2eclipse you can generate eclipse project metadata using the following command: @@ -130,5 +130,5 @@ following command: The generated eclipse projects can be imported by selecting `import existing projects` from the `file` menu. -=== Importing into other IDEs +==== Importing into other IDEs Maven is well supported by most Java IDEs. Refer to you vendor documentation. \ No newline at end of file diff --git a/docs/pom.xml b/docs/pom.xml new file mode 100644 index 0000000..bd881ad --- /dev/null +++ b/docs/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + org.springframework.cloud + spring-cloud-bus-docs + 1.0.0.BUILD-SNAPSHOT + + org.springframework.cloud + spring-cloud-build + 1.0.0.BUILD-SNAPSHOT + + + pom + Spring Cloud Bus Docs + Spring Cloud Docs + + spring-cloud-bus + ${basedir}/.. + + + + docs + + + + org.asciidoctor + asciidoctor-maven-plugin + false + + + org.apache.maven.plugins + maven-antrun-plugin + false + + + org.codehaus.mojo + build-helper-maven-plugin + false + + + + + + diff --git a/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc similarity index 89% rename from src/main/asciidoc/README.adoc rename to docs/src/main/asciidoc/README.adoc index 56252bf..00aa76c 100644 --- a/src/main/asciidoc/README.adoc +++ b/docs/src/main/asciidoc/README.adoc @@ -1,4 +1,4 @@ -= Spring Platform Bus += Spring Cloud Bus include::intro.adoc[] diff --git a/src/main/asciidoc/ghpages.sh b/docs/src/main/asciidoc/ghpages.sh similarity index 100% rename from src/main/asciidoc/ghpages.sh rename to docs/src/main/asciidoc/ghpages.sh diff --git a/src/main/asciidoc/intro.adoc b/docs/src/main/asciidoc/intro.adoc similarity index 100% rename from src/main/asciidoc/intro.adoc rename to docs/src/main/asciidoc/intro.adoc diff --git a/src/main/asciidoc/quickstart.adoc b/docs/src/main/asciidoc/quickstart.adoc similarity index 100% rename from src/main/asciidoc/quickstart.adoc rename to docs/src/main/asciidoc/quickstart.adoc diff --git a/src/main/asciidoc/spring-cloud-bus.adoc b/docs/src/main/asciidoc/spring-cloud-bus.adoc similarity index 76% rename from src/main/asciidoc/spring-cloud-bus.adoc rename to docs/src/main/asciidoc/spring-cloud-bus.adoc index d96b1c3..6011879 100644 --- a/src/main/asciidoc/spring-cloud-bus.adoc +++ b/docs/src/main/asciidoc/spring-cloud-bus.adoc @@ -1,4 +1,4 @@ -= Spring Platform Bus += Spring Cloud Bus :toc: include::intro.adoc[] diff --git a/src/main/ruby/generate_readme.sh b/docs/src/main/ruby/generate_readme.sh similarity index 100% rename from src/main/ruby/generate_readme.sh rename to docs/src/main/ruby/generate_readme.sh diff --git a/pom.xml b/pom.xml index 359b3af..5d7e30e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ spring-cloud-bus spring-cloud-bus-hystrix spring-cloud-bus-turbine + docs @@ -127,28 +128,4 @@ HEAD - - - docs - - - - org.asciidoctor - asciidoctor-maven-plugin - false - - - org.apache.maven.plugins - maven-antrun-plugin - false - - - org.codehaus.mojo - build-helper-maven-plugin - false - - - - - diff --git a/spring-cloud-bus-hystrix/src/main/java/org/springframework/cloud/bus/hystrix/HystrixStreamAutoConfiguration.java b/spring-cloud-bus-hystrix/src/main/java/org/springframework/cloud/bus/hystrix/HystrixStreamAutoConfiguration.java index e4b376b..c4e0d85 100644 --- a/spring-cloud-bus-hystrix/src/main/java/org/springframework/cloud/bus/hystrix/HystrixStreamAutoConfiguration.java +++ b/spring-cloud-bus-hystrix/src/main/java/org/springframework/cloud/bus/hystrix/HystrixStreamAutoConfiguration.java @@ -1,6 +1,7 @@ package org.springframework.cloud.bus.hystrix; import org.springframework.amqp.core.AmqpTemplate; +import org.springframework.amqp.core.DirectExchange; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; @@ -38,6 +39,12 @@ public class HystrixStreamAutoConfiguration { public DirectChannel hystrixStream() { return new DirectChannel(); } + + @Bean + public DirectExchange hystrixStreamExchange() { + DirectExchange exchange = new DirectExchange(Constants.HYSTRIX_STREAM_NAME); + return exchange; + } @ConditionalOnExpression("${hystrix.stream.bus.enabled:true}") @Bean