A message queued on a channel will stay queued on that channel until it is received by a consumer
and the consumer sends a "finish" command for that message to nsqd, to indicate it is done processing it. After the "finish" command, nsqd deletes the message from the queue. That could theoretically be months after the message was published, but usually it is seconds or minutes after.
If nsqd is stopped and restarted gracefully (with SIGINT or SIGTERM) then it saves all messages which are queued in memory to disk, and reloads them from disk, so they are not lost. But if nsqd (or the whole server) crashes, then messages in the memory queues on that server are lost. (There are also disk-queues, used when the memory queues exceed a limit.)
For long-term archiving of messages, we typically use the "nsq_to_file" utility to consume from an extra channel and create a log file of messages, in hour- or day- long parts. It is then possible to "replay" those messages into the same or a new topic using a separate utility.
NSQ isn't Kafka, it works differently in some respects ... it may help to read
http://nsq.io/overview/design.html a couple of times.