-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(restart-inbound): give the possibility to the developer to plan a restart of the connector in case of failure #3486
Conversation
…a restart of the connector in case of failure
Hey @mathias-vandaele, the ticket contains an implementation suggestion: #3319 to re-use the existing cancellation mechanism. Would be interesting to understand why you see the need to introduce another method? |
@sbuettner everything still happens during the cancellation mechanism
A callback is declared in order to be executed after cancelation 👍 |
|
||
import java.time.Duration; | ||
|
||
public class RestartException extends RuntimeException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to reuse the ConnectorRetryException
with the retries
and backoff
parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnBgood Good idea although we would need a way to restart without defining the number of retries. We could add it. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, either that or we add the retries count to the context and when throwing the exception later we use this number, similar to how it's done for Outbound connectors.
@mathias-vandaele Ah, I was confused as I saw: |
"Inbound connector executable not found for reactivation, received ID: {}", id); | ||
return; | ||
} | ||
if (toReactivate instanceof Activated activated) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it an issue if a Connector had an error? How do we handle multiple activation failure in this case?
private final BlockingQueue<InboundExecutableEvent> eventQueue; | ||
private final ScheduledExecutorService reactivationScheduler = | ||
Executors.newSingleThreadScheduledExecutor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason to use a single thread executor here?
Description
Proposal of solution for the restart of inbound connector, not tested yet
Related issues
closes #3319
Checklist
no milestone
label.