How is one supposed to use the automatic recovery ...
# troubleshooting
n
How is one supposed to use the automatic recovery features of the rabbitmq connector? Despite having network/topology recovery enabled in the config, the slightest outage to the server shuts down the whole job. Incurring such an expensive job restart because external connections had an outage seems like a wasteful pattern.
I’m simulating the outage by bouncing the rabbitmq server pod so the outage is on the order of a second or so. I’m finding it hard to believe that the nominal plan for a job is that all external systems are reachable 100% of the time or else we trigger the expensive job restart process.
My thinking is that this line is the culprit (for sources at least) because, despite the connection and channel being recoverable, this call breaks down while we're in that recovery phase.
The plot thickens.
QueueingConsumer
used by the
RMQSource
implementation does not support automatic recovery
m
The RabbitMQ connector is rather outdated so it could very well be inefficient
Then again: if there is something wrong in an external system, it does make sense that this involves some sort of restart if you want to be sure of delivery guarantees
n
I’d be on board with a job restart/failure after some time. But that level of sensitivity to something out of the jobs control is a tough one. I’ll poke around with the queuing consumer limitations I discovered and see if that can motivate some upstream changes to the connector.
m
But that doesn’t work in a distributed system. You can’t let other systems keep processing if somewhere in the chain there’s an error
n
For a sink I’m somewhat in agreement, but I don’t follow why that would be the case for a source? If I have a large pipeline with lots of managed state, why restart all of that because of a recoverable connection blip on one end? Connection outages are a part of real systems and the restart process is far slower than reviving a down connection.
And for the source side, seems like you could just backpressure until the source is healthy. A good design would be pulling from sources that support that and will retain messages until they can be processed.
m
No because checkpointing fails at some moment if backpressure is too much
At some point you will fail. If RabbitMQ was a good connector, a lot will work but at some point there’s not much you can go do anymore
Especially with RabbitMQ on the old source and sink interfaces
n
I don’t have checkpointing configured right now
m
So you have no resilience requirements?
n
Not right now while we’re demonstrating an MVP of this pipeline.
It’s been enough work to get started with demonstrating we can run a job in a managed cluster on premise and build out all the tooling to let people dynamically update the rules that act on the data. Resilience and processing guarantees are a great next step, but not a priority over demonstrating some initial correctness and usability.
If we were working with a more supported connector like Kafka, would we still experience similar job restarts if there are momentary connection issues at either end of the pipeline?
m
It depends. There are steps where it’s acceptable or configurable, but if you’re committing a transaction and that fails, that’s a reason for a restart of the job
n
Fortunately in our side, we’re dealing with message queues that are colocated in the same cluster. So a connection outage is fairly unlikely. The real case I’m trying to patch is how to gracefully rotate credentials without triggering a job restart. Lots of little limitations have added up and I’ve realized the connection has to get remade. Should be a fast and recoverable option, where I can safely remove the queueing consumer I found. For the source side, I think I can attempt a publish, catch a failure, reconnect quickly and bail out with a failure if that doesn’t work.
Unfortunately rabbitmq api limits to only updating the password associated with a user live rather than the user and password.