Description
In our architecture we depend heavily on separating the insert side from the worker side. This seems to be common given that the documentation has a dedicated section for it. This section also mentions the queue and worker options are specifically important here, but does not mention the other options. I'm curious to understand which other options in the river.Config structure are important/relevant to the functioning of an insert-only client. And also: maybe some options need to be the same between the insert-only and worker size for correct functioning?
I've gone through the options without further looking into the source code and my suspicion a that the following options are important:
- Logger: log when job get inserted
- ErrorHandler: not sure, i guess there could be an error when inserting, or maybe it is just when the worker errors?
- Middleware: some middleware is triggered when inserting jobs
- MaxAttempts: a default value, so i'm guessing this must be specified for an insert-only client
NOTE: i'm wondering if the insert-only client is common enough to be formalized in the type system? So something like NewInsertOnlyClient()
. That takes a new river.InsertOnlyConfig
as input. The river.Config could embed this new structure.