diff --git a/src/main/kotlin/core/messaging/InMemoryNetwork.kt b/src/main/kotlin/core/messaging/InMemoryNetwork.kt index 65c5558ffc..d646fce809 100644 --- a/src/main/kotlin/core/messaging/InMemoryNetwork.kt +++ b/src/main/kotlin/core/messaging/InMemoryNetwork.kt @@ -130,6 +130,8 @@ public class InMemoryNetwork { @GuardedBy("this") protected val pendingRedelivery = LinkedList() + override val myAddress: SingleMessageRecipient = handle + protected val backgroundThread = if (manuallyPumped) null else thread(isDaemon = true, name = "In-memory message dispatcher ") { while (!currentThread.isInterrupted) { try { diff --git a/src/main/kotlin/core/messaging/Messaging.kt b/src/main/kotlin/core/messaging/Messaging.kt index d415b955ce..e7a1b6b3c2 100644 --- a/src/main/kotlin/core/messaging/Messaging.kt +++ b/src/main/kotlin/core/messaging/Messaging.kt @@ -65,6 +65,9 @@ interface MessagingService { * Returns an initialised [Message] with the current time, etc, already filled in. */ fun createMessage(topic: String, data: ByteArray): Message + + /** Returns an address that refers to this node */ + val myAddress: SingleMessageRecipient } /**