-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem intercepting messages sent with StreamBridge #2885
Comments
@tigermarques, Could you put the code you provided above as a runnable sample application? This way, the triaging becomes easier. |
Do you mean a repo with the issue in a reproducible format? Or just the classes? |
I meant a standalone app in a repo. |
Hi, There is one test which is failing because the interceptor cannot get the channel name when the message is sent via the StreamBridge. |
@tigermarques Thanks for the sample; that helped. It turned out to be a bug. I pushed a change to address the issue. Please take a look at the commit above. However, you need a change in your test. I believe that the We are having some issues with our builds right now. Because of this, a snapshot of the new changes is currently unavailable. In the meantime, you can check out the |
Thanks a lot! You're right, the test needs to be updated, I had copied it from a different app and forgot to change the application name in the test. |
Fixes spring-cloud#2885 The `DirectWithAttributesChannel` used by `StreamBridge` is missing naming information. Adding the proper application context and component name data to the channel so that it is able to construct a name when queried.
I just backported to |
@sobychacko Can i get some insights on this thread: I am not sure if i can post this here, but just thought of checking if i can |
I have a global interceptor configured for all my output channels to log messages:
I use
bindingServiceProperties
mostly to determine the kafka topic that the message is being sent to.This works fine when i use message processing like
However, when i need to send a message on demand (e.g., via a REST API call), I'm using the StreamBridge approach
For this case, I can't seem to extract the channel name from the channel in the interceptor. I navigated in stream bridge code up to the point where the channel is created, and it does not seem to have a name at all when it is created this way. Is there any way that I can have at least the channel name in the interceptor, or is there an alternative way to produce the message without stream bridge?
Version of the framework 2023.0.0
The text was updated successfully, but these errors were encountered: