• Stars
    star
    332
  • Rank 125,948 (Top 3 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Spring Cloud Stream binders for Apache Kafka and Kafka Streams
CircleCI
codecov
Gitter

ANNOUNCEMENT

IMPORTANT: This repository is now migrated as part of core Spring Cloud Stream - https://github.com/spring-cloud/spring-cloud-stream. Please create new issues over at the core repository.

Apache Kafka Binder

Usage

To use Apache Kafka binder, you need to add spring-cloud-stream-binder-kafka as a dependency to your Spring Cloud Stream application, as shown in the following example for Maven:

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-stream-binder-kafka</artifactId>
</dependency>

Alternatively, you can also use the Spring Cloud Stream Kafka Starter, as shown in the following example for Maven:

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-stream-kafka</artifactId>
</dependency>

Apache Kafka Streams Binder

Usage

To use Apache Kafka Streams binder, you need to add spring-cloud-stream-binder-kafka-streams as a dependency to your Spring Cloud Stream application, as shown in the following example for Maven:

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-stream-binder-kafka-streams</artifactId>
</dependency>

Appendices

Appendix A: Building

Basic Compile and Test

To build the source you will need to install JDK 1.7.

The build uses the Maven wrapper so you don’t have to install a specific version of Maven. To enable the tests, you should have Kafka server 0.9 or above running before building. See below for more information on running the servers.

The main build command is

$ ./mvnw clean install

You can also add '-DskipTests' if you like, to avoid running the tests.

Note
You can also install Maven (>=3.3.3) yourself and run the mvn command in place of ./mvnw in the examples below. If you do that you also might need to add -P spring if your local Maven settings do not contain repository declarations for spring pre-release artifacts.
Note
Be aware that you might need to increase the amount of memory available to Maven by setting a MAVEN_OPTS environment variable with a value like -Xmx512m -XX:MaxPermSize=128m. We try to cover this in the .mvn configuration, so if you find you have to do it to make a build succeed, please raise a ticket to get the settings added to source control.

The projects that require middleware generally include a docker-compose.yml, so consider using Docker Compose to run the middeware servers in Docker containers.

Documentation

There is a "full" profile that will generate documentation.

Working with the code

If you don’t have an IDE preference we would recommend that you use Spring Tools Suite or Eclipse when working with the code. We use the m2eclipe eclipse plugin for maven support. Other IDEs and tools should also work without issue.

Importing into eclipse with m2eclipse

We recommend the m2eclipe eclipse plugin when working with eclipse. If you don’t already have m2eclipse installed it is available from the "eclipse marketplace".

Unfortunately m2e does not yet support Maven 3.3, so once the projects are imported into Eclipse you will also need to tell m2eclipse to use the .settings.xml file for the projects. If you do not do this you may see many different errors related to the POMs in the projects. Open your Eclipse preferences, expand the Maven preferences, and select User Settings. In the User Settings field click Browse and navigate to the Spring Cloud project you imported selecting the .settings.xml file in that project. Click Apply and then OK to save the preference changes.

Note
Alternatively you can copy the repository settings from .settings.xml into your own ~/.m2/settings.xml.

Importing into eclipse without m2eclipse

If you prefer not to use m2eclipse you can generate eclipse project metadata using the following command:

$ ./mvnw eclipse:eclipse

The generated eclipse projects can be imported by selecting import existing projects from the file menu. [[contributing] == Contributing

Spring Cloud is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github 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

Before we accept a non-trivial patch or pull request we will need you to sign the contributor’s agreement. Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can 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

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.

  • Use the Spring Framework code format conventions. If you use Eclipse you can import formatter settings using the eclipse-code-formatter.xml file from the Spring Cloud Build project. If using IntelliJ, you can use the Eclipse Code Formatter Plugin to import the same file.

  • Make sure all new .java files to have a simple Javadoc class comment with at least an @author tag identifying you, and preferably at least a paragraph on what the class is for.

  • Add the ASF license header comment to all new .java files (copy from existing files in the project)

  • Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes).

  • Add some Javadocs and, if you change the namespace, some XSD doc elements.

  • A few unit tests would help a lot as well — someone has to do it.

  • If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).

  • When writing a commit message please follow these conventions, if you are fixing an existing issue please add Fixes gh-XXXX at the end of the commit message (where XXXX is the issue number).

More Repositories

1

spring-cloud-netflix

Integration with Netflix OSS components
Java
4,856
star
2

spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
Java
4,439
star
3

spring-cloud-kubernetes

Kubernetes integration with Spring Cloud Discovery Client, Configuration, etc...
Java
3,426
star
4

spring-cloud-config

External configuration (server and client) for Spring Cloud
Java
1,938
star
5

spring-cloud-sleuth

Distributed tracing for spring cloud
Java
1,755
star
6

spring-cloud-openfeign

Support for using OpenFeign in Spring Cloud apps
Java
1,187
star
7

spring-cloud-dataflow

A microservices-based Streaming and Batch data processing in Cloud Foundry and Kubernetes
Java
1,088
star
8

spring-cloud-function

Java
1,032
star
9

spring-cloud-stream

Framework for building Event-Driven Microservices
Java
969
star
10

spring-cloud-stream-samples

Samples for Spring Cloud Stream
Java
944
star
11

spring-cloud-release

Spring Cloud Release Train - dependency management across a wide range of Spring Cloud projects.
871
star
12

spring-cloud-consul

Spring Cloud Consul
Java
804
star
13

spring-cloud-contract

Support for Consumer Driven Contracts in Spring
Java
716
star
14

spring-cloud-commons

Common classes used in different Spring Cloud implementations
Java
700
star
15

spring-cloud-zookeeper

Spring Cloud Zookeeper
Java
553
star
16

spring-cloud-task

Short lived microservices with Spring Batch
Java
420
star
17

spring-cloud-bus

Spring Cloud event bus
Java
405
star
18

spring-cloud-circuitbreaker

Spring Cloud Circuit Breaker API and Implementations
Java
329
star
19

spring-cloud-vault

Configuration Integration with HashiCorp Vault
Java
270
star
20

stream-applications

Functions and Spring Cloud Stream Applications for data driven microservices
Java
248
star
21

spring-cloud-dataflow-samples

Sample starter applications and code for use with the Spring Cloud Data Flow project
Java
220
star
22

spring-cloud-dataflow-ui

This repo provides the Dashboard application of Spring Cloud Data Flow
TypeScript
207
star
23

spring-cloud-build

Common build concerns, shared plugin configuration, etc. for Spring Cloud modules
Shell
185
star
24

spring-cloud-connectors

Library to let cloud applications connect to services
Java
184
star
25

spring-cloud-open-service-broker

Spring Cloud project for creating service brokers that conform to the Open Server Broker API specification
Java
164
star
26

spring-cloud-deployer

The Spring Cloud Deployer project defines an SPI for deploying long lived applications and short lived tasks
Java
159
star
27

spring-cloud-deployer-kubernetes

The Spring Cloud Deployer implementation for Kubernetes
Java
157
star
28

spring-cloud-cli

Spring Cloud CLI features
Java
155
star
29

spring-cloud-stream-binder-rabbit

Java
153
star
30

spring-cloud-core-tests

Integration tests for Spring Cloud (small projects testing classpath combinations)
Java
148
star
31

spring-cloud-skipper

A package manager that installs, upgrades, and rolls back Spring Boot applications on multiple Cloud Platforms.
Java
113
star
32

spring-cloud-stream-starters

Shell
98
star
33

spring-cloud-stream-binder-aws-kinesis

Spring Cloud Stream binder for AWS Kinesis
Java
98
star
34

spring-cloud-cloudfoundry

Integration between Cloudfoundry and the Spring Cloud APIs
Java
80
star
35

spring-cloud-schema-registry

A schema registry implementation for Spring Cloud Stream
Java
47
star
36

spring-cloud-jenkins-jobs

Spring Cloud Jenkins Job DSL
Groovy
41
star
37

spring-cloud-bindings

A library that exposes a rich Java language-binding and auto-configuration for CNB Bindings
Java
40
star
38

spring-cloud-deployer-local

The Spring Cloud Deployer implementation for a "local" machine
Java
39
star
39

spring-cloud-release-tools

Tools used for the Spring Cloud release process
Java
28
star
40

spring-cloud-deployer-cloudfoundry

The Spring Cloud Deployer implementation for Cloud Foundry
Java
27
star
41

spring-cloud-static

Static resources for the Spring Cloud website
26
star
42

spring-cloud-app-broker

Spring Cloud project for implementing service brokers that conform to the Open Server Broker API specification
Java
25
star
43

spring-cloud-common-security-config

A common security infrastructure used by Spring Cloud Data Flow and the projects in its ecosystem
Java
19
star
44

spring-functions-catalog

Reusable Spring Functions for data driven microservices
Java
17
star
45

spring-cloud-dataflow-acceptance-tests

Java
13
star
46

baseimage

Shell
12
star
47

spring-cloud.github.io

GH pages for spring-cloud
HTML
7
star
48

spring-cloud-dataflow-apps-plugin

Java
7
star
49

stream-applications-acceptance-tests

Shell
7
star
50

spring-cloud-stream-jenkins-jobs

Groovy
4
star
51

spring-cloud-dataflow-common

Java
2
star
52

.github

2
star
53

spring-cloud-dataflow-build

1
star