Interim index.html update
This commit is contained in:
28
index.html
28
index.html
@@ -43,9 +43,6 @@ microservices. Spring Cloud Stream provides an opinionated configuration of mess
|
|||||||
persistent pub/sub semantics, consumer groups and partitions across several middleware vendors. This opinionated configuration
|
persistent pub/sub semantics, consumer groups and partitions across several middleware vendors. This opinionated configuration
|
||||||
provides the basis to create stream processing applications and is highly customizable.
|
provides the basis to create stream processing applications and is highly customizable.
|
||||||
|
|
||||||
By adding `@EnableBinding` to your main application, you get immediate connectivity to a message broker and by adding
|
|
||||||
`@StreamListener` to a method, you receive events from the message broker.
|
|
||||||
|
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% capture main_content %}
|
{% capture main_content %}
|
||||||
@@ -57,11 +54,32 @@ By adding `@EnableBinding` to your main application, you get immediate connectiv
|
|||||||
<script type="text/javascript">{% include custom.js %}</script>
|
<script type="text/javascript">{% include custom.js %}</script>
|
||||||
{% include download_widget.md %}
|
{% include download_widget.md %}
|
||||||
|
|
||||||
As long as Spring Cloud Stream and a Spring Cloud Stream Binder dependencies are on the classpath any Spring Boot application with `@EnableBinding` will bind to the external message broker (e.g. Rabbit MQ or Apache Kafka, depending on the binder-implementation of choice).
|
As long as Spring Cloud Stream and a Spring Cloud Stream Binder dependencies are on the classpath any Spring Boot application with `@EnableBinding` will bind to the external
|
||||||
|
message broker (e.g. Rabbit MQ or Apache Kafka, depending on the binder-implementation of choice).
|
||||||
|
|
||||||
Let's see it in action!
|
Let's see it in action!
|
||||||
|
|
||||||
Head over to http://start.spring.io and create a project with the 'Stream Kafka' dependency. Modify the main class as shown below:
|
We show you how to create a Spring Cloud Stream application that receives messages coming from the messaging middleware of your choice (more on this later) and logs received messages to the console.
|
||||||
|
We call it `LoggingConsumer`.
|
||||||
|
While not very practical, it provides a good introduction to some of the main concepts
|
||||||
|
and abstractions, making it easier to digest the rest of this user guide.
|
||||||
|
|
||||||
|
### Create a Sample Application by Using Spring Initializr
|
||||||
|
To get started, visit the [Spring Initializr](https://start.spring.io). From there, you can generate sample application. To do so:
|
||||||
|
|
||||||
|
. In the *Dependencies* section, start typing `stream`.
|
||||||
|
When the "`Cloud Stream`" option should appears, select it.
|
||||||
|
. Start typing either 'kafka' or 'rabbit'.
|
||||||
|
. Select "`Kafka`" or "`RabbitMQ`".
|
||||||
|
+
|
||||||
|
Basically, you choose the messaging middleware to which your application binds.
|
||||||
|
We recommend using the one you have already installed or feel more comfortable with installing and running.
|
||||||
|
Also, as you can see from the Initilaizer screen, there are a few other options you can choose.
|
||||||
|
For example, you can choose Gradle as your build tool instead of Maven (the default).
|
||||||
|
. In the *Artifact* field, type 'logging-consumer'.
|
||||||
|
+
|
||||||
|
The value of the *Artifact* field becomes the application name.
|
||||||
|
If you chose RabbitMQ for the middleware, your Spring Initializr should now be as follows:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
|
|||||||
Reference in New Issue
Block a user