prepare_messages, go back to Broadway module for more information.
Invoked for preparing messages before handling (if defined).
Broadway.Messagestruct to be processed.
contextis the user defined data structure passed to
This is the place to prepare and preload any information that will be used
handle_message/3. For example, if you need to query the database,
instead of doing it once per message, you can do it on this callback.
The length of the list of messages received by this callback is based on
max_demand configuration in the processor. This callback
must always return all messages it receives, as
handle_message/3 is still
called individually for each message afterwards.