Repository navigation
Conversation
When StreamBridge evicts a channel from its cache it removes the binding properties that were created for the dynamic destination. It did so with the cache key, which is "<binder>:<destination>" when a binder name is given, while BindingServiceProperties keys the entry by the destination alone. For StreamBridge.send(destination, binderName, data) the removal was therefore a no-op and one BindingProperties entry was kept for every destination ever sent to, regardless of dynamic-destination-cache-size. Use the name the channel was created for when removing the properties and when checking whether the binding was configured by the application. Signed-off-by: kdelay <kdelay20@gmail.com>
olegz
pushed a commit
that referenced
this pull request
Oct 14, 2026
When StreamBridge evicts a channel from its cache it removes the binding properties that were created for the dynamic destination. It did so with the cache key, which is "<binder>:<destination>" when a binder name is given, while BindingServiceProperties keys the entry by the destination alone. For StreamBridge.send(destination, binderName, data) the removal was therefore a no-op and one BindingProperties entry was kept for every destination ever sent to, regardless of dynamic-destination-cache-size. Use the name the channel was created for when removing the properties and when checking whether the binding was configured by the application. Signed-off-by: kdelay <kdelay20@gmail.com> Resolves #3306
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On eviction, StreamBridge removes the evicted binding's properties using the cache key. With a binder name that key is
<binder>:<destination>, butBindingServicePropertieskeys the entry by destination alone, so forsend(destination, binderName, data)nothing is removed and one entry is kept per destination ever sent to.This uses the channel's binding name for the removal and for the configured-binding check added in #3257.
Added
bindingsWithBinderNameAreRemovedWithCache. Without the fix it fails withbinding1andbinding2still present../mvnw -f core/pom.xml installpasses. InStreamBridgeTestsonlytest_3033fails, with or without this change.