activity timing out on large exception

0

As there is 32K limit on activity result I see activities just timing out when result is larger while it is OK for normal cases, in case when activity is throwing an exception I cannot see the error reason.

Specifically we are using SWF Java Flow Framework. Besides we use Hibernate with Spring. When data access layer throws exception, its text (including all the stack) is longer than 32K. In this case we see no activity failure, but just timeout. We could resolve it using custom serializer, but I would prefer a solution using fewer custom components.

Is there such a solution?

Alex2
gefragt vor 5 Jahren225 Aufrufe
4 Antworten
0

I'm not sure what generic solution would help here. Due to the size limit some information must be lost. IMHO logging the exception from the activity and returning a different exception that misses the stack trace (or part of it) is a reasonable workaround.

mfateev
beantwortet vor 5 Jahren
0

Thank you Maxim!

Is there any standard mechanism to implement a "stardard global" exception handler in between completion of activity and activity worker process?

Thank you

Alex2
beantwortet vor 5 Jahren
0

It looks like (https://github.com/aws/aws-swf-flow-library/blob/master/src/main/java/com/amazonaws/services/simpleworkflow/flow/pojo/POJOActivityImplementation.java#L100) that DataConverter is used to serialize the exception. So you can create a custom DataConverter to implement this logic.

mfateev
beantwortet vor 5 Jahren
0

Thanks a lot. We'll go that way.

Alex2
beantwortet vor 5 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen