Connect() Method
- Last UpdatedApr 08, 2026
- 1 minute read
A shared connection that is shared by PubSubConnection objects in the application will be used to handle the application's PubSub requests. The PubSub Application Programming Interface (API) will handle thread safety in the global connection. The application will be registered with the name "'appname'_global" (that is, "myapp_global") and will have a buffer size of 50000 messages allocated in the PubSub system for it.
Note: This connection is not the Global Connection, in this case individual PubSubConnection objects are allocated, but they share their underlying connection to the engine.
A connect command must be called before some PubSub actions (mainly Publish) can be successfully executed. Failure to connect before calling some routines will cause a PubSubNotInitException to be thrown. This command does nothing if this object is already connected. If a non-shared connection is desired, then the application should provide connection parameters as follows: Connect ("MyApName", 5000);
PubSubConnection PS = new PubSubConnection();
PS.Connect();