core.messaging / Message

# Message

`interface Message`

A message is defined, at this level, to be a (topic, timestamp, byte arrays) triple, where the topic is a string in Java-style reverse dns form, with "platform." being a prefix reserved by the platform for its own use. Vendor specific messages can be defined, but use your domain name as the prefix e.g. "uk.co.bigbank.messages.SomeMessage".

The debugTimestamp field is intended to aid in tracking messages as they flow across the network, likewise, the message ID is intended to be an ad-hoc way to identify a message sent in the system through debug logs and so on. These IDs and timestamps should not be assumed to be globally unique, although due to the nanosecond precision of the timestamp field they probably will be, even if an implementation just uses a hash prefix as the message id.

### Properties

data | `abstract val data: ByteArray`
debugMessageID | `abstract val debugMessageID: String`
debugTimestamp | `abstract val debugTimestamp: Instant`
topic | `abstract val topic: String`

### Functions

serialise | `abstract fun serialise(): ByteArray`