Can I have more than one outbox in the same application, to have different retry policies? #737
-
I would like to have more than one transactional outbox in my application, so that I can configure each one with different attempt frequency and number of attempts. For example, some operations need to be retried for long a period of time (e.g., attempt for up to 7 days). And for others, a shorter retry policy is desirable (e.g., give up after a few minutes or after a few retries). I was wondering if the outboxes would interfere with each other in unexpected ways (since they work on the same TXNO_OUTBOX table). Or if there is there a recommended way to achieve what I want, i.e. to have different retry policies for different operations? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Interesting idea. There is no easy way to do this. I think what we probably want is a new option for parameterised calls, e.g.
And add It's not a tricky change. |
Beta Was this translation helpful? Give feedback.
-
For now, I don't think there will be any problems running two instances of |
Beta Was this translation helpful? Give feedback.
-
@lburja and @nishiol: apologies for the delay in responding two these two PRs. #739 and #790 @victokoh also wants to adapt the retry approach, but in their case they want to allow for exponential backoff. I think we need a unified approach here. My suggestion is to have an interface something like this:
And implement the current behaviour like this:
You can then just pass an instance of
Then
You can also then add a
How does this sound? |
Beta Was this translation helpful? Give feedback.
-
@victokoh and I are talking this over now to implement a starter solution |
Beta Was this translation helpful? Give feedback.
Interesting idea. There is no easy way to do this.
I think what we probably want is a new option for parameterised calls, e.g.
And add
overrideMaxAttemptCount
andoverrideTimeBetweenAttempts
nullable fields toTXNO_OUTBOX
. to support it.It's not a tricky change.