diff --git a/src/Message/JsonMessageSerializer.php b/src/Message/JsonMessageSerializer.php index 4d6df216..81a6220c 100644 --- a/src/Message/JsonMessageSerializer.php +++ b/src/Message/JsonMessageSerializer.php @@ -39,7 +39,8 @@ public function unserialize(string $value): MessageInterface throw new InvalidArgumentException('Metadata must be array. Got ' . get_debug_type($meta) . '.'); } - $message = new Message('$name', $payload['data'] ?? null, $meta); + // TODO: will be removed later + $message = new Message($payload['name'] ?? '$name', $payload['data'] ?? null, $meta); if (isset($meta[EnvelopeInterface::ENVELOPE_STACK_KEY]) && is_array($meta[EnvelopeInterface::ENVELOPE_STACK_KEY])) { $message = $message->withMetadata(