public function setWill(Message $message): self
    {
        // Proceed only if we have a valid message
        $this->bitFlag &= ~4;
        if ($message->getTopicName() !== '') {
            $this->logger->debug('Setting will flag');
            $this->bitFlag |= 4;
        }

        $this->will = $message;
        $this
            ->setWillRetainBit($message->isRetained())
            ->setWillQoSLevelBit($message->getQoSLevel());

        return $this;
    }