From afc8fa29da421f41fa70cedc4acc3b6c07addcf0 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Wed, 26 Feb 2025 08:38:25 +0100 Subject: [PATCH] GH-3076 Change 'bindings' to ConcurrentHashMap in 'BindingServiceProperties' Using 'ConcurrentSkipListMap' was causing significant performance issues Resolves #3076 --- .../cloud/stream/config/BindingServiceProperties.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BindingServiceProperties.java b/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BindingServiceProperties.java index 341d4ef7b..a0c625079 100644 --- a/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BindingServiceProperties.java +++ b/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BindingServiceProperties.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.concurrent.ConcurrentSkipListMap; +import java.util.concurrent.ConcurrentHashMap; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -106,8 +106,7 @@ public class BindingServiceProperties * For example; This sets the content-type for the 'input' binding of a Sink * application: 'spring.cloud.stream.bindings.input.contentType=text/plain' */ - private Map bindings = new ConcurrentSkipListMap( - String.CASE_INSENSITIVE_ORDER); + private Map bindings = new ConcurrentHashMap<>(); /** * Additional per-binder properties (see {@link BinderProperties}) if more then one