Adds dynamic response diversion between connections#2190
Adds dynamic response diversion between connections#2190alstanchev merged 8 commits intoeclipse-ditto:masterfrom
Conversation
|
TODO:
|
thjaeckle
left a comment
There was a problem hiding this comment.
@alstanchev I had a first brief look and left some feedback .. but did not yet "dive into" the pub/sub stuff too much :D
base/model/src/main/java/org/eclipse/ditto/base/model/headers/DittoHeaderDefinition.java
Outdated
Show resolved
Hide resolved
base/model/src/main/java/org/eclipse/ditto/base/model/headers/DittoHeaderDefinition.java
Outdated
Show resolved
Hide resolved
base/model/src/main/java/org/eclipse/ditto/base/model/headers/DittoHeaderDefinition.java
Outdated
Show resolved
Hide resolved
base/model/src/main/java/org/eclipse/ditto/base/model/headers/DittoHeaderDefinition.java
Show resolved
Hide resolved
base/model/src/main/java/org/eclipse/ditto/base/model/headers/DittoHeaderDefinition.java
Outdated
Show resolved
Hide resolved
.../service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActor.java
Outdated
Show resolved
Hide resolved
.../service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActor.java
Outdated
Show resolved
Hide resolved
.../org/eclipse/ditto/connectivity/service/messaging/validation/ResponseDiversionValidator.java
Outdated
Show resolved
Hide resolved
...vity/service/src/main/java/org/eclipse/ditto/connectivity/service/util/ConnectionPubSub.java
Outdated
Show resolved
Hide resolved
documentation/src/main/resources/_posts/2025-10-09-response-diversion.md
Show resolved
Hide resolved
72885b9 to
4e95a6b
Compare
thjaeckle
left a comment
There was a problem hiding this comment.
Hi @alstanchev
Already looking quite good 👍
I left some little remarks inline - I also prepared a review commit, but have no permission to push it on your fork :)
I will upload it as diff to the PR.
.../org/eclipse/ditto/connectivity/service/messaging/validation/ResponseDiversionValidator.java
Outdated
Show resolved
Hide resolved
.../org/eclipse/ditto/connectivity/service/messaging/validation/ResponseDiversionValidator.java
Outdated
Show resolved
Hide resolved
...main/java/org/eclipse/ditto/connectivity/service/messaging/ResponseDiversionInterceptor.java
Outdated
Show resolved
Hide resolved
|
@alstanchev is this PR still in "Draft"? |
Hi @thjaeckle it is no longer a "Draft". I have addressed the remarks, updated the doc and made some minor improvements. |
|
@alstanchev did/do you also add system-tests for this feature? |
|
I started a SystemTests run: https://github.com/eclipse-ditto/ditto/actions/runs/17647744642 |
I wondered why you ask me this until i saw i had wrong remote for my testing repo. 😁 The tests are pushed and i have started a run. |
|
@alstanchev the Kafka IT test |
|
Hi @alstanchev, yes i saw them but was dealing with other issues. I will see why, fix them and write back as soon as possible |
|
@thjaeckle, fixed the tests and they pass every time locally. But as we are lucky people 😤, they fail in the GH action. Looking in to it now. |
Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
…ere applicable for "response diversion", providing a little more "safety" Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
a2be9c0 to
4adb76b
Compare
|
@thjaeckle fixed the tests. Currently there are failing RestConnectionsIT but they also fail on master. There seems to be some issue with thr JWT configuration. |
|
@alstanchev aright. I will have a look at why they fail on master And will do another final review of the PR |
|
@thjaeckle The RestConnectionsIT are green now. The OAUTH_PROTOCOL env was not working for some reason but setting CONFIG_FORCE_ditto_gateway_authentication_oauth_protocol in the gateway confgi in the compose did the job. |
|
|
||
| #### Header mapping keys | ||
|
|
||
| #### divert-response-to-connection |
There was a problem hiding this comment.
If "Header mapping keys" is level 4 heading, this (and the other header keys as well) must be a level 5
thjaeckle
left a comment
There was a problem hiding this comment.
Apart from one little remark about the documentation, this looks very good 👍
Please also update the blogpost date before merging :)
Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
Adds response diversion functionality to route command responses to different connections at runtime. Addresses use cases where responses need to go to systems other than the original sender.
Implements #2106