0
votes

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
Can you share your custom source application? GH link, perhaps?Sabby Anandan
Here is my source application github.com/Dhpandey/SpringStreamDemo/tree/master/…. Please provide some reference guide to start with this scenario.thedheeraz
I tried to locally run your StreamDemoApplication and StreamDemoSink - 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
I was able to run both of them as independent applications though . Anyway i will restart with these guide strictly. Thank you. And one more question, Is there any specific way to register stream definition to spring cloud data flow ?thedheeraz
Please review the app registration docs from the reference guide. All the docs are accessible from the project site, too. Also, there are some SCDF samples that use the OOTB stream applications. Once you register your apps, you can then use them similarly.Sabby Anandan

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.