Just a second...

Starting and stopping publishers

Typically publishers are started when the server starts but you can prevent such automatic start up and allow publishers to be started using System Management.

Publishers can also be stopped and restarted using System Management functions and are automatically stopped and removed when the server closes.

In order for a publisher to function properly on being stopped and restarted from System Management it must be able to cater for the integrity of its data and client connections. For this reason a publisher cannot be stopped by default and must override the isStoppable method to enable this functionality.

Publisher startup steps

When a publisher is started it goes through its initial processing in the order shown below:

Table 1. Start publisher
Add initial topics Initial topics configured for the publisher are added.
initialLoad The initialLoad notification method is called. This can be used to perform any initial processing required for the publisher. Topics can be added here. Other aspects of the publisher, such as topic loaders and client listeners can also be set up here. If an exception is thrown by this method, the publisher fails to start.
STARTED At this point the publisher is considered to have started.
publisherStarted The publisherStarted notification method is called.

Publisher closedown steps

When a publisher is stopped, either during server closedown or by System Management it goes through the following steps:

Table 2. Stop publisher
publisherStopping The publisherStopping notification method is called to allow the publisher to perform any preliminary close processing.
Remove topics All topics owned by the publisher are removed.
STOPPED At this point the publisher is considered to be stopped.
publisherStopped The publisherStopped notification method is called.
Client events Stopped Client event notifications are stopped.

Publisher removal

A publisher is removed after it is stopped during server closedown but you can also remove a stopped publisher at any time using System Management. Once removed a publisher cannot be restarted again until the server is restarted.

In either case, after removal the publisherRemoved notification method is called.