You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using go routine to frequently call this method causes the service to crash.
package main
import (
"context"
"github.com/benthosdev/benthos/v4/public/service"
// Import only required Benthos components, switch with `components/all` for
// all standard components.
_ "github.com/benthosdev/benthos/v4/public/components/io"
_ "github.com/benthosdev/benthos/v4/public/components/pure"
// Build a stream with our configured components.
stream, err := builder.Build()
panicOnErr(err)
// And run it, blocking until it gracefully terminates once the generate
// input has generated a message and it has flushed through the stream.
err = stream.Run(context.Background())
panicOnErr(err)
}
How to solve this problem?
The text was updated successfully, but these errors were encountered:
Using go routine to frequently call this method causes the service to crash.
package main
import (
"context"
)
func main() {
panicOnErr := func(err error) {
if err != nil {
panic(err)
}
}
input:
generate:
count: 1
interval: 1ms
mapping: 'root = "hello world"'
processors:
- mapping: 'root = content().uppercase()'
output:
stdout: {}
logger:
level: none
`)
panicOnErr(err)
}
How to solve this problem?
The text was updated successfully, but these errors were encountered: