net.corda.core.messaging / createMessage

# createMessage

`fun MessagingService.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.