trait RetryMiddleware extends AnyRef

Implement retry transparently for a Client as Middleware. For dynamics, this is a bit hard as the server could be busy but returns 500. Otherwise, other 500 errors maybe or maybe not should be retryable. The retry policies herein are based on specific statuses, specific OS likely retryable errors and errors caused potentially by mangled message bodies.

The new dynamics governer limits are in place and these retry policies take them into account via status TooManyRequests:

See also

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/api-limits

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RetryMiddleware
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def backoff[F[_]](maxRetries: Int = 5, initialDelay: FiniteDuration = 5.seconds)(implicit eh: MonadError[F, Throwable], timer: Timer[F]): Middleware[F]
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def directly[F[_]](maxRetries: Int = 5)(implicit F: MonadError[F, Throwable]): Middleware[F]
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def makeMiddleware[F[_]](retry: (F[DisposableResponse[F]]) ⇒ F[DisposableResponse[F]], isError: (Status) ⇒ Boolean = http.retry.shouldRetry)(implicit F: MonadError[F, Throwable], FM: FlatMap[F]): Middleware[F]

    Construct middleware with retry strategies which ensure that responses with statuses known to be retryable are retried.

    Construct middleware with retry strategies which ensure that responses with statuses known to be retryable are retried. The retry policy is embedded in the "retry" parameter. Therefore, your effect must be able to express "retry" semantics. "retry" is composed with the output from the Middlware's input Client. Your retry strategy may wish to filter on different types of errors so that not every Throwable causes a retry. makeSomeStatusesErrors is automatically composed.

  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def pause[F[_]](maxRetries: Int = 5, delayBetween: FiniteDuration = 5.seconds)(implicit F: MonadError[F, Throwable], timer: Timer[F]): Middleware[F]
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped