A Broadway producer implementation for Sequin consumer groups.
Add off_broadway_sequin to your list of dependencies in mix.exs:
def deps do
[
{:off_broadway_sequin, "~> 0.1.0"}
]
endConfigure Broadway to use the Sequin producer:
defmodule MyApp.Pipeline do
use Broadway
def start_link(_opts) do
Broadway.start_link(__MODULE__,
name: __MODULE__,
producer: [
module: {
OffBroadwaySequin.Producer,
consumer: "my-consumer-group",
token: "your-sequin-token"
}
],
processors: [
default: [concurrency: 10]
]
)
end
def handle_message(_, message, _) do
message
end
end-
:consumer- Required. The name of your Sequin consumer group. -
:token- Required. Your Sequin API authentication token. -
:base_url- Optional. The base URL for the Sequin API. Defaults to "https://api.sequinstream.com/api".
See our example project for an end-to-end example of how to use this library.
MIT