You can put all the topics in same table. That table should have an identity column which you can make its primary key also. Then whenever a new topic is added, it will get incremented automatically.
The other method is to create a GUID whenever a new topic needs to be added. You can use a component for creating a GUID. You may also create it by appending current date, time including microsecond and then a 5 digit random number to it. Then you can use that number as the primary key of the topics table. This method is preferable as you can pass this number as querystring without losing security. Whereas if you pass identity defined topic ids through querystring, people may tend to change them in the addressbar and access topics that are not meant for them.
For e.g. if there is a page
to display all postings related to a topic, people may change the number 33 to 32 or 31 to access other topics.