Skip to content

Instantly share code, notes, and snippets.

@softberries
Created March 21, 2023 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save softberries/6bc84111d15a0cc11908d21920ad6351 to your computer and use it in GitHub Desktop.
Save softberries/6bc84111d15a0cc11908d21920ad6351 to your computer and use it in GitHub Desktop.
def prepare_messages(messages, _context) do
IO.puts("Messages in prepare stage: #{inspect(messages)}")
messages = Enum.map(messages, fn message ->
Broadway.Message.update_data(message, fn data ->
%{event: Jason.decode(data)}
end)
end)
messages
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment