-
Notifications
You must be signed in to change notification settings - Fork 179
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
Decorator API for Publisher & Subscribers, Outgoing Message Interceptors #1856
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1856 +/- ##
============================================
+ Coverage 73.69% 77.03% +3.33%
- Complexity 3147 3214 +67
============================================
Files 276 280 +4
Lines 11261 10951 -310
Branches 1437 1405 -32
============================================
+ Hits 8299 8436 +137
+ Misses 2271 1834 -437
+ Partials 691 681 -10
|
I didn't review properly, but I'd suggest to avoid extending EDIT: my bad, I understood that multiple interceptors can apply. If only one of them can apply, it should indeed be the one with the highest priority value. EDIT2: ok so these classes are actually all beans, so perhaps it would be best to leave instance selection to CDI completely. It has means to resolve ambiguity based on priority already (though having to declare |
d42cb73
to
40ccf94
Compare
…i module OutgoingInterceptor for intercepting outgoing messages
40ccf94
to
49d45d8
Compare
During my tests I couldn't reproduce CDI ordering the instances by default from the I see that |
Ah, right, iterating through |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There have been previous discussions on message interceptors #1141
@RequestScoped
beans. More recently there is a need to improve OpenTelemetry support by propagating traces through RM streams OpenTelemetry support enhancement #1784.An internal
PublisherDecorator
extension point already exists for incoming channels, which is used for metrics and Vert.x context association.This PR
PublisherDecorator
to the API moduleSubscriberDecorator
for decoratingMulti
s that are sources for subscribers in the channel graph.isConnector
flag for distinguishing channels bound to a connector.SubscriberDecorator
which discoversOutgoingInterceptor
beans for attaching interceptors to channels.OutgoingInterceptor
s can alter outgoing messages withonMessage
callback, and when supported by the connector (Kafka and MQTT) can access transmission results withonMessageAck
callback.