Establish Subject Naming Conventions
It is good practice to carefully plan the subject naming conventions for programs, and document them clearly for reference. Follow these guidelines:
| • | Plan naming conventions to reflect the logical structure of the data in the application domain. |
| • | Study the programming examples in the src/examples/ subdirectory. |
| • | As you design naming conventions, think about the kinds of information that your programs will receive. Also think about the kinds of information that your program will ignore. |
| • | Use a reasonably small number of levels in subject names—four or five is usually sufficient. (Rendezvous software permits many levels in subject names, but it is good practice to limit the number of levels you actually use.) |
| • | Avoid the use of spaces and special characters even where permitted by the Rendezvous API. They could cause trouble later with various editors, browsers and other tools. |
| • | Keep subject names manageable and readable. |
| • | Keep subject names short for maximum speed and message throughput. |
| • | Allocate the maximum storage for subject names. Subject name length is artificially limited to 255 bytes so that programs can allocate name buffers with a reasonable size. To maximize code reusability, allocate 255 bytes for buffers that receive subject names, even if your program does not use such long names. |
In C and C++, the 255 byte limit is defined by the constant TIBRV_SUBJECT_MAX in the Rendezvous header files.