In this repository, you will find a collection of components that can meet various data integration use cases and requirements.
The repository’s primary focus is to provide a set of standalone Java functions that can be useful in the end-user applications as-is.
Besides, this repository builds on the Java functions to generate standalone Spring Cloud Stream applications that can run against Spring Cloud Stream’s RabbitMQ or Apache Kafka binder implementations. It is also possible to extend the generator to bundle the Java functions with the other supported binder implementations.
These applications can run standalone or as part of a data flow, such as the one orchestrated using Spring Cloud Data Flow.
The repository includes two major sections - Functions
and Applications
.
The former hosts the various Java functions, and the latter is for generating the standalone Spring Cloud Stream applications and hosting their related components.
The following are the various components of this repository.
java.util.Supplier |
java.util.Function |
java.util.Consumer |
---|---|---|
Source |
Processor |
Sink |
You can build everything from the root of the repository.
Note
|
The build depends on the global property ${revision} to configure the current project version.
This value is resolved with the maven-flatten-plugin .
Because of this, you need to install some core poms in the local maven repository before running a build command.
To perform this necessary step, run setup-build.sh .
|
./setup-build.sh
./mvnw clean install
Tip
|
By default the build skips long running tests, annotated with @Tag("integration") ,including tests requiring Testcontainers. To run the full test suite, activate the integration Maven profile:
./mvnw clean install -Pintegration . This applies to building functions or individual applications as well.
|
However, this may not be what you are interested in since you are probably interested in a single application or a few of them.
To build the functions and applications that you are interested in, you need to build them selectively, as shown below.
./mvnw clean install -f functions
You can also build a single function or group of functions.
For example, if you are only interested in jdbc-supplier
and log-consumer
, do the following.
./mvnw clean install -pl :jdbc-supplier,:log-consumer
Let’s assume that you want to build a jdbc-source
application based on Kafka Binder in Spring Cloud Stream and Log Sink application based on Rabbit binder.
Here is what you need to do. Assuming that you already built both functions and stream-applications-core as above,
./mvnw clean package -pl :jdbc-source
cd applications/source/jdbc-source/apps/jdbc-source-kafka
./mvnw clean package
This will generate the Kafka binder based uber jar in the target folder.
Similarly, for the log-sink
, do the following.
./mvnw clean package -pl :log-sink
cd applications/sink/log-sink/apps/log-sink-rabbit
./mvnw clean package
Rebuild all container images.
./local/build-images.sh
Here is a list of resources where you can find out more about using and developing functions and stream applications:
Please see our Code of Conduct