/off_broadway_memory

A Broadway producer for an in-memory buffer

Primary LanguageElixirApache License 2.0Apache-2.0

Off Broadway Memory

A Broadway producer for an in-memory buffer.

Installation

The package can be installed by adding off_broadway_memory to your list of dependencies in mix.exs:

def deps do
  [
    {:off_broadway_memory, "~> 1.1"}
  ]
end

Start a buffer:

OffBroadwayMemory.Buffer.start_link(name: :example_buffer)

Connect it to Broadway:

Broadway.start_link(MyBroadway,
  name: MyBroadway,
  producer: [
    module: {OffBroadwayMemory.Producer, buffer: :example_buffer},
    concurrency: 1
  ],
  processors: [default: [concurrency: 50]]
)

Push data to be processed:

OffBroadwayMemory.Buffer.push(:example_buffer, ["example", "data", "set"])

License

OffBroadwayMemory is released under the Apache License 2.0.

About

This package was written by Elliot Jackson.