Created
March 21, 2023 14:19
-
-
Save softberries/cfe46adf002a4ce9aaaf96e06769102a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyBroadway do | |
use Broadway | |
alias Broadway.Message | |
def start_link(_opts) do | |
Broadway.start_link(__MODULE__, | |
name: __MODULE__, | |
producer: [ | |
# producer configuration | |
], | |
processors: [ | |
# processor configuration | |
], | |
batchers: [ | |
# batchers configuration | |
] | |
) | |
end | |
def handle_message(_processor_name, message, _context) do | |
.... | |
end | |
def handle_batch(_batch, messages, _batch_info, _context) do | |
..... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment