A Broadway producer for an in-memory buffer.
The package can be installed by adding off_broadway_memory to your list of
dependencies in mix.exs:
def deps do
[
{:off_broadway_memory, "~> 0.1"}
]
endUsage (full documentation)
Start a buffer:
{:ok, buffer_pid} = OffBroadwayMemory.Buffer.start_link()Connect it to Broadway:
Broadway.start_link(MyBroadway,
name: MyBroadway,
producer: [
module: {OffBroadwayMemory.Producer, buffer_pid: buffer_pid},
concurrency: 1
],
processors: [default: [concurrency: 50]],
)Push data to be processed:
OffBroadwayMemory.Buffer.push(buffer_pid, ["example", "data", "set"])OffBroadwayMemory is released under the Apache License 2.0.
This package was written by Elliot Jackson.
- Blog: https://elliotekj.com
- Email: [email protected]