what is easiest way to run my spring cloud stream application using spring cloud data flow ? My idea is to create custom source using kafka binder and sink as prebuilt starter ,file. I am creating applciation which is pretty basic , similar to this. I tried creating executable jar and registering it as source using dataflow shell, that didn't work at all. I am already following this document.
1 Answers
2
votes
Finally , I found it easier to register custom streams in spring cloud data flow,
I was able to register using maven coordinates as explained here.
My solution:
For coordinates that look like
<groupId>com.streamdemo</groupId>
<artifactId>Streamdemo</artifactId>
<version>0.0.1-SNAPSHOT</version>
I used maven://com.streamdemo:Streamdemo:0.0.1-SNAPSHOT
, and registered to SCDF.
Actual command looks like :
dataflow:>app register --name mysource --type source --uri maven://com.streamdemo:Streamdemo:0.0.1-SNAPSHOT
It worked fine. Here is my code for Source stream.
StreamDemoApplication
andStreamDemoSink
- both the applications fail to bootstrap with different errors. We'd highly recommend following the getting-started guide by downloading the stream application with the intended binder from Spring Initializr. Only when you're able to run them successfully as standalone Boot applications, we can then register in Spring Cloud Data Flow and use it in the stream definition. – Sabby Anandan