core.messaging.message_utils
unpack_message
def unpack_message(msg_name: str,
data: str,
*,
comp_id: UnitID,
payload: Payload | None = None) -> Message
Unpacks a message from string data.
Arguments:
msg_name- The name of the message.data- The data as a JSON string.comp_id- The identifier of the receiving component.payload- An optional payload.
Returns:
The unpacked message.