diff options
author | Jakub Dudycz <jakub.dudycz@nokia.com> | 2019-01-07 15:30:34 +0100 |
---|---|---|
committer | Jakub Dudycz <jakub.dudycz@nokia.com> | 2019-01-08 13:00:49 +0100 |
commit | f93aa0835306dc8e45e166185e408fbb5f6aced8 (patch) | |
tree | 309c5e250410a383dd511c9ea499850bf7f995e6 /sources/hv-collector-xnf-simulator/src | |
parent | 8b4e282df3863042c69dae60460ec2397e12562e (diff) |
Align XNF simulator batch with Netty's queue size
This change will lessen the probability of out of memory errors
Change-Id: I96c735f4d7f5cedf3fddd66830e6557ea35ad1ea
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-1062
Diffstat (limited to 'sources/hv-collector-xnf-simulator/src')
-rw-r--r-- | sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt index ca6d169a..d32ca800 100644 --- a/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt +++ b/sources/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt @@ -35,6 +35,7 @@ import reactor.core.publisher.Mono import reactor.core.publisher.ReplayProcessor import reactor.netty.NettyOutbound import reactor.netty.tcp.TcpClient +import reactor.util.concurrent.Queues.XS_BUFFER_SIZE /** * @author Jakub Dudycz <jakub.dudycz@nokia.com> @@ -81,7 +82,7 @@ class VesHvClient(private val configuration: SimulatorConfiguration) { val encoder = WireFrameEncoder(allocator) val frames = messages .map(encoder::encode) - .window(MAX_BATCH_SIZE) + .window(XS_BUFFER_SIZE) return nettyOutbound .logConnectionClosed() @@ -106,6 +107,5 @@ class VesHvClient(private val configuration: SimulatorConfiguration) { companion object { private val logger = Logger(VesHvClient::class) - private const val MAX_BATCH_SIZE = 128 } } |