mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
Make integration tests pass in AMQP mode, part 1 (#1855)
This commit is contained in:
@ -213,6 +213,7 @@ data class TopicSession(val topic: String, val sessionID: Long = MessagingServic
|
||||
* 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.
|
||||
*/
|
||||
@CordaSerializable
|
||||
interface Message {
|
||||
val topicSession: TopicSession
|
||||
val data: ByteArray
|
||||
|
@ -133,6 +133,11 @@ class NodeMessagingClient(override val config: NodeConfiguration,
|
||||
persistentEntityClass = RetryMessage::class.java
|
||||
)
|
||||
}
|
||||
|
||||
private class NodeClientMessage(override val topicSession: TopicSession, override val data: ByteArray, override val uniqueMessageId: UUID) : Message {
|
||||
override val debugTimestamp: Instant = Instant.now()
|
||||
override fun toString() = "$topicSession#${String(data)}"
|
||||
}
|
||||
}
|
||||
|
||||
private class InnerState {
|
||||
@ -599,13 +604,7 @@ class NodeMessagingClient(override val config: NodeConfiguration,
|
||||
|
||||
override fun createMessage(topicSession: TopicSession, data: ByteArray, uuid: UUID): Message {
|
||||
// TODO: We could write an object that proxies directly to an underlying MQ message here and avoid copying.
|
||||
return object : Message {
|
||||
override val topicSession: TopicSession = topicSession
|
||||
override val data: ByteArray = data
|
||||
override val debugTimestamp: Instant = Instant.now()
|
||||
override val uniqueMessageId: UUID = uuid
|
||||
override fun toString() = "$topicSession#${String(data)}"
|
||||
}
|
||||
return NodeClientMessage(topicSession, data, uuid)
|
||||
}
|
||||
|
||||
private fun createOutOfProcessVerifierService(): TransactionVerifierService {
|
||||
|
Reference in New Issue
Block a user