-
Notifications
You must be signed in to change notification settings - Fork 815
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
Make service.RunWithOpts public again #1302
Comments
Hey @joao3101, which specific options were you using with v3? There are some that I'm happy to add but others that I'd rather avoid if possible. |
Hi @Jeffail. That's the function that we actually have to start Benthos:
|
Hi @Jeffail , Any news on this? We run our services normally, but as the RunWithOpts is not public anymore, we're running our integration tests as streams, as suggested. But we have some services that receives http_servers as inputs, and on those integration tests, when we send the POST request, we're having the following problem: When I run it normally on my PC (without streams), the response is ok: If you need more information, tell me and I'll send you a snippet of a simplified version of the pipeline we have. Thank you in advance! |
Hey @joao3101 if it's for testing purposes I'd recommend setting https://pkg.go.dev/github.com/benthosdev/benthos/v4@v4.9.0/public/service#StreamBuilder.SetHTTPMux and then calling that multiplexer directly as it saves you needing to spin up and call real HTTP servers. Alternatively you can still set the config field |
Hi @Jeffail, I've tried using http.enabled = true, but it didn't work also, still on the same Bellow is a sample (I've removed what is not important for this specific part): http:
address: ${HTTP_ADDRESS:0.0.0.0:4195}
enabled: true
input:
broker:
inputs:
- label: input_httpserver
http_server:
path: /ingest
sync_response:
status: ${!meta("status")}
processors:
- bloblang: |
root = {"keep":"alive"}
batching:
count: ${KAFKA_BROKER_BATCH_COUNT:0}
period: ${KAFKA_BROKER_BATCH_PERIOD:""}
buffer:
type: memory |
Which version of Benthos are you pulling? The was a bug fix in 4.6.0 you might be missing: https://github.com/benthosdev/benthos/blob/main/CHANGELOG.md#fixed-3 |
This solved a problem, but came up with another (don't know if they're related): |
@joao3101 You'll want to pull the latest version. There were some issues with the underlying Sarama library which had to be reverted to an older version for now... |
On V3, we could start the service with RunWithOpts. On V4, we can only start it passing options if we use the StreamBuilder. Although StreamBuilder is great, RunWithOpts is more suitable for most of our use cases, so it would be nice to get this public again :)
P.S: This was already discussed on the Discord channel a few time ago.
The text was updated successfully, but these errors were encountered: