Use ThreadSafe publication instead of exclusive publication

master
Robinson 2023-12-12 13:25:01 +01:00
parent a706cdb228
commit e80cc93c72
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
2 changed files with 4 additions and 4 deletions

View File

@ -206,7 +206,7 @@ internal class ClientHandshakeDriver(
// this check is in the "reconnect" logic
// can throw an exception! We catch it in the calling class
val publication = aeronDriver.addExclusivePublication(publicationUri, streamIdPub, logInfo, true)
val publication = aeronDriver.addPublication(publicationUri, streamIdPub, logInfo, true)
// can throw an exception! We catch it in the calling class
// we actually have to wait for it to connect before we continue
@ -272,7 +272,7 @@ internal class ClientHandshakeDriver(
// can throw an exception! We catch it in the calling class
val publication = aeronDriver.addExclusivePublication(publicationUri, streamIdPub, logInfo, false)
val publication = aeronDriver.addPublication(publicationUri, streamIdPub, logInfo, false)
// can throw an exception! We catch it in the calling class
// we actually have to wait for it to connect before we continue

View File

@ -136,7 +136,7 @@ internal object ServerHandshakePollers {
// this will always connect to the CLIENT handshake subscription!
val publication = try {
driver.addExclusivePublication(publicationUri, message.streamId, logInfo, true)
driver.addPublication(publicationUri, message.streamId, logInfo, true)
}
catch (e: Exception) {
// we should immediately remove the logbuffer for this! Aeron will **EVENTUALLY** remove the logbuffer, but if errors
@ -394,7 +394,7 @@ internal object ServerHandshakePollers {
// this will always connect to the CLIENT handshake subscription!
val publication = try {
driver.addExclusivePublication(publicationUri, message.streamId, logInfo, false)
driver.addPublication(publicationUri, message.streamId, logInfo, false)
} catch (e: Exception) {
// we should immediately remove the logbuffer for this! Aeron will **EVENTUALLY** remove the logbuffer, but if errors
// and connections occur too quickly (within the cleanup/linger period), we can run out of memory!