If the Artemis connectionTTL configuration is not set then some of the cleanup actions do not happen on client kill. This prevents durable messages being replayed (#3351)

and may prevent cleanup of other resources.

Undo spurious code
This commit is contained in:
Matthew Nesbit
2018-06-13 10:32:29 +01:00
committed by GitHub
parent e2701e69d6
commit 4bf5d809a5
3 changed files with 8 additions and 20 deletions

View File

@ -38,7 +38,7 @@ class ArtemisMessagingClient(private val config: SSLConfiguration,
val locator = ActiveMQClient.createServerLocatorWithoutHA(tcpTransport).apply {
// Never time out on our loopback Artemis connections. If we switch back to using the InVM transport this
// would be the default and the two lines below can be deleted.
connectionTTL = -1
connectionTTL = 60000
clientFailureCheckPeriod = -1
minLargeMessageSize = maxMessageSize
isUseGlobalPools = nodeSerializationEnv != null
@ -49,7 +49,7 @@ class ArtemisMessagingClient(private val config: SSLConfiguration,
// using our TLS certificate.
// Note that the acknowledgement of messages is not flushed to the Artermis journal until the default buffer
// size of 1MB is acknowledged.
val session = sessionFactory!!.createSession(NODE_P2P_USER, NODE_P2P_USER, false, true, true, locator.isPreAcknowledge, DEFAULT_ACK_BATCH_SIZE)
val session = sessionFactory!!.createSession(NODE_P2P_USER, NODE_P2P_USER, false, true, true, false, DEFAULT_ACK_BATCH_SIZE)
session.start()
// Create a general purpose producer.
val producer = session.createProducer()