Comments (12)
init_for_broadway/3 would still return {:producer, state}, correct?
Yes.
Is there any value in an abstraction requires less knowledge of GenStage?
It may have and we are slightly walking towards it, it seems, but we are not there yet. The important thing to note is, if we introduce an abstraction that abstracts away GenStage, then we may no longer support existing GenStage producers (which is a feature of the current design.
from broadway.
Not allowed and likely won't ever be.
from broadway.
@josevalim is there a reason for going with a different name instead of init/3
?
from broadway.
from broadway.
@josevalim okay, fair enough. I would suggest the name init_with_broadway_info/3
then, but good to go on my side :)
from broadway.
init_for_broadway/3
would still return {:producer, state}
, correct?
Is there any value in an abstraction requires less knowledge of GenStage?
defmodule MyProducer do
use Broadway.Producer
def init(options, {name, index}, topology) do
{:ok, state}
end
end
from broadway.
It may have and we are slightly walking towards it, it seems, but we are not there yet.
In that case, init_for_broadway/3 works for me 👍
from broadway.
Kafka needs it for reasons I can't remember
Yup, we need this for kafka to make sure the producer always sends messages from the same partition to the same processor so we can guarantee the order of messages and have safe acknowledgements. However, we need to guarantee that throughout the pipeline, so as far as I can remember, we'll also need something similar for batcher consumers.
from broadway.
Ah, in the Kafka case we need a way to modify all options before we even start the producers. 🤔
from broadway.
So I talked to @msaraiva and we will call this prepare_options
and it will only receive producer options and return updated producer options. The partition-ing or not will be a producer configuration.
from broadway.
For GCPubSub and Amazon SQS, I have thought more about it, and I think it doesn't make sense to couple the pool size to the topology, because we never know if the acking is happening on processors or batchers, especially in face of failures and the upcoming ack_immediately
. So I think the best option for the connection pool size is to make it the double of number of producers by default, but make it overall configurable.
from broadway.
Is multiple producers support added? In documentation it is still stated:
:producer - Required. A keyword list of options. See "Producers options" section below. Only a single producer is allowed.
from broadway.
Related Issues (20)
- 1->n message processing HOT 3
- Possibility to update Pipeline :context ? HOT 1
- Allow use of nimble_options 0.4.0 HOT 2
- [Question] how am i able to update a message in handle_failed and send to another batcher? HOT 1
- How to stop a Broadway Kafka pipeline? HOT 1
- Make producer module a keyword list to ease configuration management? HOT 6
- Broadway.update_rate_limit doesn't reset the counter/interval right away HOT 3
- NoopAcknowledger fails with ack key being set HOT 7
- Disable automatic call to handle_batch/4 HOT 2
- [Question] Creating a Broadway Message struct for testing?
- Telemetry distinguish between Producer metrics HOT 2
- Expected Behavior on Startup? HOT 4
- [docs] The `Broadway.test_batch` example doesn't work with Broadway 1.0.3 HOT 3
- Dialyzer error on ack_immediately/1 HOT 3
- Broadway v1.0.4 Broadway.NoopAcknowledger returns NoopAcknowledger instead of Broadway.NoopAcknowledger HOT 1
- Add `terminate/3` callback HOT 11
- Oban producer HOT 3
- Allow support for Nimble Options 1.0 HOT 5
- Request for MQTT support in Elixir Broadway HOT 3
- Issues using Broadway with DynamicSupervisor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broadway.