Skip to content

Commit afc8fa2

Browse files
committed
GH-3076 Change 'bindings' to ConcurrentHashMap in 'BindingServiceProperties'
Using 'ConcurrentSkipListMap' was causing significant performance issues Resolves #3076
1 parent d847f1c commit afc8fa2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/config/BindingServiceProperties.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.HashMap;
2121
import java.util.List;
2222
import java.util.Map;
23-
import java.util.concurrent.ConcurrentSkipListMap;
23+
import java.util.concurrent.ConcurrentHashMap;
2424

2525
import com.fasterxml.jackson.annotation.JsonInclude;
2626
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@@ -106,8 +106,7 @@ public class BindingServiceProperties
106106
* For example; This sets the content-type for the 'input' binding of a Sink
107107
* application: 'spring.cloud.stream.bindings.input.contentType=text/plain'
108108
*/
109-
private Map<String, BindingProperties> bindings = new ConcurrentSkipListMap(
110-
String.CASE_INSENSITIVE_ORDER);
109+
private Map<String, BindingProperties> bindings = new ConcurrentHashMap<>();
111110

112111
/**
113112
* Additional per-binder properties (see {@link BinderProperties}) if more then one

0 commit comments

Comments
 (0)