mirror of
https://github.com/corda/corda.git
synced 2025-01-18 02:39:51 +00:00
Revert "Reverting "Upgrade Artemis to 2.1.0" as the new version seems to introduce a race condition that causes a RPC stability test to randomly hang."
This reverts commit 022fb7b8cb
.
This commit is contained in:
parent
f8ad5c9d10
commit
4f16512dcf
@ -22,7 +22,7 @@ buildscript {
|
|||||||
ext.capsule_version = '1.0.1'
|
ext.capsule_version = '1.0.1'
|
||||||
|
|
||||||
ext.asm_version = '0.5.3'
|
ext.asm_version = '0.5.3'
|
||||||
ext.artemis_version = '1.5.3'
|
ext.artemis_version = '2.1.0'
|
||||||
ext.jackson_version = '2.8.5'
|
ext.jackson_version = '2.8.5'
|
||||||
ext.jetty_version = '9.3.9.v20160517'
|
ext.jetty_version = '9.3.9.v20160517'
|
||||||
ext.jersey_version = '2.25'
|
ext.jersey_version = '2.25'
|
||||||
|
@ -40,6 +40,7 @@ import net.corda.nodeapi.ConnectionDirection
|
|||||||
import net.corda.nodeapi.internal.ShutdownHook
|
import net.corda.nodeapi.internal.ShutdownHook
|
||||||
import net.corda.nodeapi.internal.addShutdownHook
|
import net.corda.nodeapi.internal.addShutdownHook
|
||||||
import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException
|
import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException
|
||||||
|
import org.apache.activemq.artemis.api.core.RoutingType
|
||||||
import org.apache.activemq.artemis.api.core.client.ActiveMQClient
|
import org.apache.activemq.artemis.api.core.client.ActiveMQClient
|
||||||
import org.apache.activemq.artemis.api.core.client.ClientMessage
|
import org.apache.activemq.artemis.api.core.client.ClientMessage
|
||||||
import org.bouncycastle.asn1.x500.X500Name
|
import org.bouncycastle.asn1.x500.X500Name
|
||||||
@ -223,7 +224,7 @@ open class Node(override val configuration: FullNodeConfiguration,
|
|||||||
session.start()
|
session.start()
|
||||||
|
|
||||||
val queueName = "$IP_REQUEST_PREFIX$requestId"
|
val queueName = "$IP_REQUEST_PREFIX$requestId"
|
||||||
session.createQueue(queueName, queueName, false)
|
session.createQueue(queueName, RoutingType.MULTICAST, queueName, false)
|
||||||
|
|
||||||
val consumer = session.createConsumer(queueName)
|
val consumer = session.createConsumer(queueName)
|
||||||
val artemisMessage: ClientMessage = consumer.receive(10.seconds.toMillis()) ?:
|
val artemisMessage: ClientMessage = consumer.receive(10.seconds.toMillis()) ?:
|
||||||
|
@ -30,12 +30,12 @@ import org.apache.activemq.artemis.core.config.Configuration
|
|||||||
import org.apache.activemq.artemis.core.config.CoreQueueConfiguration
|
import org.apache.activemq.artemis.core.config.CoreQueueConfiguration
|
||||||
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl
|
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl
|
||||||
import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration
|
import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration
|
||||||
|
import org.apache.activemq.artemis.core.message.impl.CoreMessage
|
||||||
import org.apache.activemq.artemis.core.remoting.impl.netty.*
|
import org.apache.activemq.artemis.core.remoting.impl.netty.*
|
||||||
import org.apache.activemq.artemis.core.security.Role
|
import org.apache.activemq.artemis.core.security.Role
|
||||||
import org.apache.activemq.artemis.core.server.ActiveMQServer
|
import org.apache.activemq.artemis.core.server.ActiveMQServer
|
||||||
import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl
|
import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl
|
||||||
import org.apache.activemq.artemis.core.server.impl.RoutingContextImpl
|
import org.apache.activemq.artemis.core.server.impl.RoutingContextImpl
|
||||||
import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl
|
|
||||||
import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy
|
import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy
|
||||||
import org.apache.activemq.artemis.core.settings.impl.AddressSettings
|
import org.apache.activemq.artemis.core.settings.impl.AddressSettings
|
||||||
import org.apache.activemq.artemis.spi.core.remoting.*
|
import org.apache.activemq.artemis.spi.core.remoting.*
|
||||||
@ -445,7 +445,7 @@ class ArtemisMessagingServer(override val config: NodeConfiguration,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun sendResponse(remoteAddress: String?) {
|
fun sendResponse(remoteAddress: String?) {
|
||||||
val responseMessage = ServerMessageImpl(random63BitValue(), 0).apply {
|
val responseMessage = CoreMessage(random63BitValue(), 0).apply {
|
||||||
putStringProperty(ipDetectResponseProperty, remoteAddress)
|
putStringProperty(ipDetectResponseProperty, remoteAddress)
|
||||||
}
|
}
|
||||||
val routingContext = RoutingContextImpl(null)
|
val routingContext = RoutingContextImpl(null)
|
||||||
|
@ -32,6 +32,7 @@ import net.corda.nodeapi.VerifierApi.VERIFICATION_REQUESTS_QUEUE_NAME
|
|||||||
import net.corda.nodeapi.VerifierApi.VERIFICATION_RESPONSES_QUEUE_NAME_PREFIX
|
import net.corda.nodeapi.VerifierApi.VERIFICATION_RESPONSES_QUEUE_NAME_PREFIX
|
||||||
import org.apache.activemq.artemis.api.core.ActiveMQObjectClosedException
|
import org.apache.activemq.artemis.api.core.ActiveMQObjectClosedException
|
||||||
import org.apache.activemq.artemis.api.core.Message.*
|
import org.apache.activemq.artemis.api.core.Message.*
|
||||||
|
import org.apache.activemq.artemis.api.core.RoutingType
|
||||||
import org.apache.activemq.artemis.api.core.SimpleString
|
import org.apache.activemq.artemis.api.core.SimpleString
|
||||||
import org.apache.activemq.artemis.api.core.client.*
|
import org.apache.activemq.artemis.api.core.client.*
|
||||||
import org.apache.activemq.artemis.api.core.client.ActiveMQClient.DEFAULT_ACK_BATCH_SIZE
|
import org.apache.activemq.artemis.api.core.client.ActiveMQClient.DEFAULT_ACK_BATCH_SIZE
|
||||||
@ -513,7 +514,7 @@ class NodeMessagingClient(override val config: NodeConfiguration,
|
|||||||
val queueQuery = session!!.queueQuery(SimpleString(queueName))
|
val queueQuery = session!!.queueQuery(SimpleString(queueName))
|
||||||
if (!queueQuery.isExists) {
|
if (!queueQuery.isExists) {
|
||||||
log.info("Create fresh queue $queueName bound on same address")
|
log.info("Create fresh queue $queueName bound on same address")
|
||||||
session!!.createQueue(queueName, queueName, true)
|
session!!.createQueue(queueName, RoutingType.MULTICAST, queueName, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user