Files
Spring Operator 5bfe5f3df7 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://docs.spring.io/spring-kafka/reference/htmlsingle/ (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring-kafka/reference/htmlsingle/ ([https](https://docs.spring.io/spring-kafka/reference/htmlsingle/) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/ ([https](https://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/) result 200).

# Ignored
These URLs were intentionally ignored.

* http://localhost:8080 with 2 occurrences
* http://localhost:8080/ with 1 occurrences
2019-04-24 12:51:38 -04:00
..
2019-03-21 15:17:39 -04:00
2017-08-17 13:33:20 -04:00
2019-03-21 15:20:21 -04:00
2019-04-24 12:51:38 -04:00

Spring Cloud Stream Testing with Embedded Kafka Broker Sample

In this Spring Cloud Stream sample, an embedded kafka broker is used for testing.

Requirements

To run this sample, you will need to have installed:

  • Java 8 or Above

Code Tour

This sample is a Spring Boot application that uses Spring Cloud Stream to receive a String message and forward an upper case version of that String; it uses the Kafka binder.

  • EmbeddedKafkaApplication - the Spring Boot Main Application
  • EmbeddedKafkaApplicationTests - the test case

The spring-kafka-test dependency added to the pom.xml puts the KafkaEmbedded JUnit @Rule on the class path. Refer to the Spring for Apache Kafka Reference Manual for more information about this. Notice how the @BeforeClass method sets up the Boot and binder properties to locate the servers.

The test method starts by using the Spring Boot auto-configured KafkaTemplate to send a message to the input destination. It then creates a consumer to consume from the output destination; gets the output message and asserts that it's an upper case version of the sent message.

See the application.properties file for the properties that are required for this test case and application. In particular, raw header mode is used.

Building with Maven

Build the sample and run the test by executing:

source>$ mvn clean package

or run the test in your favorite IDE.