It had been in production for almost 20 years. Not as long as the history of the rotary engine itself, but nonetheless the undisputed flagship towards the latter years, since the demise of the 3-rotor Eunos Cosmo. The first rotary by Mazda was Cosmo Sports, which came out in 1967. It kind of looked like the Lotus Elan, but let's not worry about that.
Since then Mazda introduced quite a few models with rotaries. Most, if not all, had a name starting with the prefix 'RX.' The 'R' stood for rotary and RX-7 happens to be the 7th in line.
There is some confusion as to which cars were which because Mazda eventually started to phase in the use of actual names for them. The above prefix-derived names got obscured while they seem to have been more prevalent for cars that were exported. They were code names that were found more in official automotive records.
Mazda ended production of 3rd generation RX-7s after completing orders received by the end of August 2002. Here's a cutout from a newspaper a friend sent me. I myself am a believer, that it would be resurrected before 2007.
The history of RX-7, provided by Mazda themselves is below. It's all in Japanese and I'm not aware of whether an English version is in the works. You can still look around for pictures.
These are the links to online sites:
Further notes and pictures on the 3rd generation (FD3S) RX-7 are here.
For the curious folks, you can read about RX-7 and me here.
The work that has been done on my car is here.
Pictures of my car are here.