Channel Subscription¶
This API subscribes to a channel. Once the channel object is obtained, it can be used to add message listeners/callbacks. Subscription process is not instantaneous, which means an added listener may not receive messages published at the same time when it is added. In order to make sure that the subscriber is ready to receive messages from the channel, it is recommended to check the subscription status.
// subscribe to the "default" messaging channel
public IChannel Backendless.Messaging.Subscribe();
// subscribe to a channel identified by "channelName"
public IChannel Backendless.Messaging.Subscribe( string channelName )
where:
Argument | Description |
---|---|
channelName |
name of the channel to subscribe to. |
Return value:
Channel object, can is used to add messaging listeners/callbacks.