Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

rh-event-flow/eventflow-processor-archetypes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stream Processor Archetypes

For building stream processors that communicate with eachother, using CloudEvents, this repository contains a collection of archetypes for a quick developer experience.

Supported Processors Archetypes

  • source: Sample project that generates data and submits it via CloudEvents to an injected target.
  • sink: Sample consumer that receives a CloudEvent from a configured data stream topic.
  • processor: Sample data processor that reveices CloudEvents and submits them to a different target.

Demo

Watch a short demo of how to use the Processor Archetypes on YouTube:

Using CloudEvent Flow Archetypes

Usage

In order to run the archetype, make sure that the following repo configured in your settings.xml file:

    <repositories>
        <repository>
            <id>jboss-thirdparty-releases</id>
            <name>JBoss Thirdparty Releases</name>
            <url>https://repository.jboss.org/nexus/service/local/repositories/thirdparty-releases/content/</url>
        </repository>
    </repositories>

OKD and oc CLI

You need OKD and the latest oc CLI. We have setup a prepared script for running OKD v3.10, here, and provision the Strimzi APB and the Event Flow APB.

Source Archetype

Building an application that sends CloudEvent data to a stream processing pipeline, by using the following archetype:

mvn archetype:generate \
    -DarchetypeGroupId=io.streamzi.eventflow.archetypes \
    -DarchetypeArtifactId=eventflow-source-archetype \
    -DarchetypeVersion=0.0.1 \
    -DgroupId=com.mycorp \
    -DartifactId=my-src \
    -DdhOrg=myorg \
    -Dversion=1.0-SNAPSHOT

This generates a new maven project inside the my-src folder. Make yourself familiar with the Java API, used in the src/main/java folder. Build the project running mvn clean install. This will build a FatJar and a Linux Container, containing the FatJar application. Now it's time to register the newly created Stream Processor application, by invoking:

oc create -f ./src/main/resources/my-source.yml 

The new Stream Processor is now available for usage in the Event Flow Editor.

Sink Archetype

Building an application that receives CloudEvent data from a stream processing pipeline, by using the following archetype:

 mvn archetype:generate \
    -DarchetypeGroupId=io.streamzi.eventflow.archetypes \
    -DarchetypeArtifactId=eventflow-sink-archetype \
    -DarchetypeVersion=0.0.1 \
    -DgroupId=com.mycorp \
    -DartifactId=my-sink \
    -DdhOrg=myorg \
    -Dversion=1.0-SNAPSHOT

This generates a new maven project inside the my-sink folder. Make yourself familiar with the Java API, used in the src/main/java folder. Build the project running mvn clean install. This will build a FatJar and a Linux Container, containing the FatJar application. Now it's time to register the newly created Stream Processor application, by invoking:

oc create -f ./src/main/resources/my-sink.yml 

The new Stream Processor is now available for usage in the Event Flow Editor.

Processor Archetype

Building an application that receives and sends CloudEvent data from and to a stream processing pipeline, by using the following archetype:

 mvn archetype:generate \
    -DarchetypeGroupId=io.streamzi.eventflow.archetypes \
    -DarchetypeArtifactId=eventflow-processor-archetype \
    -DarchetypeVersion=0.0.2-SNAPSHOT \
    -DgroupId=com.mycorp \
    -DartifactId=my-proc \
    -DdhOrg=myorg \
    -Dversion=1.0-SNAPSHOT

This generates a new maven project inside the my-proc folder. Make yourself familiar with the Java API, used in the src/main/java folder. Build the project running mvn clean install. This will build a FatJar and a Linux Container, containing the FatJar application. Now it's time to register the newly created Stream Processor application, by invoking:

oc create -f ./src/main/resources/my-processor.yml 

The new Stream Processor is now available for usage in the Event Flow Editor.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages