opsb
Integrating Broadway with Bourne (gen_stage for postgres streaming queries)
I’ve got an SQS message which triggers a large postgres query, the results of which are then processed in batches, performing a postgres update for each batch. I’m looking at using Broadway for the SQS integration and GitHub - mtwilliams/bourne: 🚤 Better streaming for Ecto. · GitHub which allows you to use a postgres streaming query as a gen_stage producer.
Where I’m a little fuzzy is how to integrate Broadway and Bourne. In particular Bourne creates a new stage each time you run a postgres query. This would mean that the handle_message (or perhaps handle_batch) callback would create a new gen_stage producer for the postgres query, effectively creating a Bourne gen_stage pipeline inside the Broadway gen_stage pipeline.
Should the Bourne pipeline run inside a single stage inside Broadway? Another option might be for Broadway to delegate to the Bourne pipeline when fetching demand?
First Post!
punkrockpolly
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









