publishTopic

@CheckReturnValue
abstract override fun <T> publishTopic(topic: TopicIn<T>, value: T): Completable

Publishes a payload to the given topic.

Note that you need to use a SOContext which includes the given topic in order to be able to publish to the given topic here. If no applicable SOContext for publishing to the given topic is currently in use, the returned Completable will emit a ContextNotInUseException error.

Scheduler: The returned Completable will operate on the IO Scheduler.

Return

A Completable which completes once the publish has been performed (this means when the publish command has been sent, not when it has been received), or a ContextNotInUseException if no SOContext is currently in use which contains the given topic within its SOContext.inTopics.

Parameters

topic

the topic to publish to. This needs to be a TopicIn, so a topic which is defined to be used as an input to the remote device.

value

the payload to publish

See also