No, it is not mandatory. Registration is to guarantee your rights and to prove the ownership of this trademark, otherwise, not registering the trademark may expose it to be misused, or be registered by someone under his name, which would prevent you from using it in the future.