Just a second...

Publisher design

Considerations when designing a publisher

Consider the following points when designing and writing a publisher:

Data modeling
The way that the data is fed to a publisher and the way in which the state of the data is maintained within a publisher is key to good performance. Keep message sizes to a minimum and this can be achieved using fine data granularity enabled by the topic tree.
Caching
Cache messages wherever possible rather than building new ones every time one must be sent. This particularly applies to topic load messages which can be cached to send to every new client that subscribes, and rebuilt only when the data actually changes. The ideal place to keep such cached messages is with a data object attached to the topic (see topic data pattern).
String handling
Building of Strings by concatenation is very inefficient in Java™. Keep String concatenation to a minimum. When String content is used, message caching can help to some degree and wherever possible cache Strings that must be built.
Conditional processing
Excessive use of conditional processing (Checking of topic paths, and so on) can be expensive. Use of the topic data pattern can significantly reduce the need for such processing when many topics are in use.
Concurrency
Concurrent programming means that access to data often must be synchronized but care must be taken not to synchronize more than is necessary as performance can be significantly affected.