danielgmyers / flux-swf-client

Apache License 2.0
9 stars 3 forks source link

FluxCapacitorImpl.initialize does not handle throttling gracefully #44

Closed chriseldredge closed 2 years ago

chriseldredge commented 2 years ago

When an app is initializing for the first time in an SWF domain and that app contains hundreds of workflows and/or activities, the aws sdk client may throw: software.amazon.awssdk.services.swf.model.SwfException: Rate exceeded (Service: Swf).

Ideally FluxCapacitorImpl would use exponential back-off to gracefully complete registration steps.

danielgmyers commented 2 years ago

This is a good callout.

I'm thinking the client should actually call List* first, and only call Register for things that actually need to be registered.

danielgmyers commented 2 years ago

Oh, I already call DescribeRegistered* first. Simple enough to add inline backoff, at least.

danielgmyers commented 2 years ago

I merged this fix. I'll probably publish a new version to maven central in the next day or so.

danielgmyers commented 2 years ago

2.0.7 has this fix and is available in maven central now.