Replies: 5 comments 5 replies
-
It would be nice to see an example of plugin v2 that uses metrics and logger provided explicitly as args before in register function and I suspect hidden inside |
Beta Was this translation helpful? Give feedback.
-
Talking about thoughts and ideas I really miss something like TransactionChan() for processors :) It would be awesome if the new processor plugin API could at least assume and eventually support streaming interfaces in the future like io.Reader/io.Writer or some kind of channel or iterator to process very large message in chunks or produce them without a need to store the whole thing in memory. |
Beta Was this translation helpful? Give feedback.
-
The plugins v2 branch has been merged into master, but still within a package marked experimental. Main advantage here is that you'll be able to see the plugin API in https://pkg.go.dev/github.com/Jeffail/benthos/v3@master/public. |
Beta Was this translation helpful? Give feedback.
-
The new API is now in its permanent home at |
Beta Was this translation helpful? Give feedback.
-
TLDR; I believe that the plugin API has a problem that boils down to: plugin implementors struggle to make the right decision on if a connection error is the right thing to return or just a regular error. Meanwhile, operators struggle to configure error scenarios to their liking. I also believe this may be addressable with a standard set of input configuration in the plugins API. I think the API could use some improvements in regards to error scenarios that are inherent in the current "special errors" described at ~56 minutes into your walk through. I actually am facing a similar issue to #1210 with When a plugin is returning
The intent here can be described as:
This approach to handling error scenarios in practice does not work as one might think because The API problems:
Hope this was helpful and thanks for a great tool! |
Beta Was this translation helpful? Give feedback.
-
Hey everyone I'm in the process of implementing a brand new plugins API, you can find the API docs here: https://pkg.go.dev/github.com/Jeffail/benthos/v3@master/public/x/service
And there's an example directory showing what it looks like to use: https://github.com/benthosdev/benthos-plugin-example/tree/plugins-v2
And here's a stream of me talking through some of the functionality: https://youtu.be/x23HwcENXWM
Feel free to use this discussion as a dumping ground for thoughts, opinions, ideas and concerns. I want to know what's missing that you rely on in the old APIs, which parts don't look user friendly, etc.
Beta Was this translation helpful? Give feedback.
All reactions