-
Notifications
You must be signed in to change notification settings - Fork 167
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
on_before_message affecting message to all listeners #300
Comments
Yes, the stomp frame is an object -- and not intended to be unmodifiable -- so changing it in one listener would affect the next. |
Ok, but then with that listeners interdependency, we can’t establish two, or more, lines of execution in a simple manner. Why have it? Is there any advantage in that approach? |
The advantage is you can use a chain of listeners to enrich the message with further detail (i.e. pre/post processing steps). I recall at least one conversation with a user who is doing something along those lines. Ideally both usecases should be possible. A version of the frame which is the modified version versus the original -- but obviously it hasn't be raised before. |
Closing issue since this will be addressed in the next release. |
I'm not sure if this is the correct approach nor if it's the desirable behaviour, but I noticed that if I have two listeners attached to the same transport and one of them change the
headers
orbody
inside theon_before_message
method, all the subsequent listeners will received the modified message.Is this the desired behaviour or am I missing something?
The text was updated successfully, but these errors were encountered: