Reputation: 58
In Spring XD , I am running a stream with multiple modules as shown below
XD> Stream create MainStream --definition "Kafka-Source | processor-module1 | processor-module2| module-sink" --deploy
I am throwing runtimeException() in module2 code of above pipeline and expecting to fail the stream after throwing exception but Stream is not failing. I tried checking stream list command its showing stream status as "deployed".
Can anyone help me how to fail a stream on runtime if any exceptions occurred in any one of the modules ?
Upvotes: 0
Views: 63
Reputation: 174719
It's not supported.
Deployment is under the control of the admin; the containers don't know about the admin so there is no built-in way for a module within a stream to undeploy the stream.
Your custom module(s) would have to know the URLs of the admins and use the REST API to undeploy the stream.
Upvotes: 1