@Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Message)) {
            return false;
        }
        Message comp = (Message) obj;
        if (this.code != comp.getCode()) {
            return false;
        }
        if (this.key != comp.getKey()) {
            return false;
        }
        if (this.port != comp.getPort()) {
            return false;
        }
        if (this.time != comp.getTime()) {
            return false;
        }
        if (!this.replyAddress.equals(comp.getReplyAddress())) {
            return false;
        }
        if (!this.content.equals(comp.getContent())) {
            return false;
        }
        return true;
    }