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
질문됨 5년 전225회 조회
4개 답변
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
답변함 5년 전
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
답변함 5년 전
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
답변함 5년 전
0

Thanks a lot. We'll go that way.

Alex2
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠