com.r3corda.core.messaging / MessagingService / createMessage

createMessage

abstract fun createMessage(topic: String, sessionID: Long = DEFAULT_SESSION_ID, data: ByteArray): Message

Returns an initialised Message with the current time, etc, already filled in.

Parameters

topic - identifier for the general subject of the message, for example "platform.network_map.fetch". Must not be blank.

sessionID - identifier for the session the message is part of. For messages sent to services before the construction of a session, use DEFAULT_SESSION_ID.


abstract fun createMessage(topicSession: TopicSession, data: ByteArray): Message

Returns an initialised Message with the current time, etc, already filled in.

Parameters

topicSession - identifier for the topic and session the message is sent to.