Side Outputs from RichAsyncFunction

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Side Outputs from RichAsyncFunction

KristoffSC
Hi all,
Is there a way to emit a side output from RichAsyncFunction operator like it
is possible with ProcessFunctions via ctx.output(outputTag, value); At first
glance I don't see a way to do it

In my use case RichAsyncFunction is used to call REST services and I would
like to handle REST error codes and exceptions by emitting special Events as
a SideOutput.

Thanks,
Krzysztof



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Side Outputs from RichAsyncFunction

KristoffSC
Hi,
any thoughts about this one?

Regards,
Krzysztof



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Side Outputs from RichAsyncFunction

Chesnay Schepler
I don't think this is possible.

At the very least you should be able to workaround this by having your
AsyncFunction return an Either<X, CustomError>, and having a subsequent
ProcessFunction do the side-output business.

On 19/02/2020 22:25, KristoffSC wrote:

> Hi,
> any thoughts about this one?
>
> Regards,
> Krzysztof
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
>