-
Notifications
You must be signed in to change notification settings - Fork 230
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
Add new "Hono" connection type #1548
Add new "Hono" connection type #1548
Conversation
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
…on type Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
…to feature/Hono_connection_type # Conflicts: # connectivity/model/src/main/java/org/eclipse/ditto/connectivity/model/HonoAddressAlias.java
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
…tion_type # Conflicts: # connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/DefaultClientActorPropsFactory.java
…to feature/Hono_connection_type # Conflicts: # connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultHonoConfig.java # connectivity/service/src/main/resources/connectivity.conf
* Extracted method for getting a JsonObject as a Map to improve readability. * Also use new features of Java 17 to improve readability. Signed-off-by: Juergen Fickel <juergen.fickel@bosch.io>
…m value. Signed-off-by: Juergen Fickel <juergen.fickel@bosch.io>
* Moved interface from connectivity API to connectivity service to limit its scope. * Moved utility method for getting URI from HonoConfig to implementing class because it is the only place where it is required now. * Changed getter for bootstrap server URIs to actually return a set of URIs instead of a comma separated string. * Renamed getter for credentials to state which type of credentials it returns in case there would be other credential types in future. * Let DefaultHonoConfig base on ScopedConfig to get DittoConfigErrors in case of configuration errors. * Added unit tests for DefaultHonoConfig. * Refined some Javadoc comments. Signed-off-by: Juergen Fickel <juergen.fickel@bosch.io>
Connection enrichment extracted in a new class DefaultHonoConnectionFactory HonoConfig cleaned up from the method getTenantId() and the parameter of getCredentials() HonoConfig simplified - extension mechanism removed. Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
* Renamed method `getName` to `getAliasValue` to distinct it more clearly from an enum's inherent `name` method. * Converted methods for resolving addresses from static methods to instance methods. This makes them less error-prone because the alias value does not have to be provided. Furthermore, got rid of the boolean parameter in favour of a more expressive method name. Signed-off-by: Juergen Fickel <juergen.fickel@bosch.io>
* Applied clean code principles to `HonoValidator` to improve its readability. * Made existing unit tests more comprehensive. * Added some unit test cases. Signed-off-by: Juergen Fickel <juergen.fickel@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
…to feature/Hono_connection_type # Conflicts: # connectivity/model/src/main/java/org/eclipse/ditto/connectivity/model/HonoAddressAlias.java # connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoConnectionFactory.java
`HonoAddressAlias` was refactored beforehand which caused the compilation errors. Signed-off-by: Juergen Fickel <juergen.fickel@bosch.io>
* Removed unused method `getUri`. * Do not extend `Extension` because it really does not. Signed-off-by: Juergen Fickel <juergen.fickel@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
ConnectionUri class made public
Signed-off-by: Silviya Georgieva-Lyoteva (IOC/PAP-DDM-RM) <Silviya.Georgieva-Lyoteva@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
…tion_type # Conflicts: # connectivity/model/src/main/java/org/eclipse/ditto/connectivity/model/ImmutableConnection.java # connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActor.java # connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActorTest.java
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
…rThrow Signed-off-by: Silviya Georgieva-Lyoteva (IOC/PAP-DDM-RM) <Silviya.Georgieva-Lyoteva@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
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.
Wow, what a great effort, thank you @abalarev and @SilviaGeorgievaLyoteva
I did just a quick scan (and mainly on the added docs) and found some formatting issues, e.g. the {{
were not escaped at one place.
I added some (not many, I promise ;)) inline comments.
documentation/src/main/resources/pages/ditto/connectivity-protocol-bindings-hono.md
Outdated
Show resolved
Hide resolved
documentation/src/main/resources/pages/ditto/connectivity-protocol-bindings-hono.md
Outdated
Show resolved
Hide resolved
documentation/src/main/resources/pages/ditto/connectivity-protocol-bindings-hono.md
Outdated
Show resolved
Hide resolved
documentation/src/main/resources/pages/ditto/connectivity-protocol-bindings-hono.md
Outdated
Show resolved
Hide resolved
documentation/src/main/resources/pages/ditto/connectivity-protocol-bindings-hono.md
Outdated
Show resolved
Hide resolved
documentation/src/main/resources/pages/ditto/connectivity-protocol-bindings-hono.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
…tion_type # Conflicts: # connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActor.java
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
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.
Complete codebase was reviewed as part of development process.
The changes I requested were all done.
So: LGTM 👍
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
New connection type 'hono' is introduced for user convenience. It is based on Kafka connection, but some connection properties must not to be included in the connection definition as they are automatically generated at runtime, like:
telemetry
,event
,command
orcommand_response
)A new piggyback command is implemented to return the "real" connection after resolving the address aliases and with included generated properties.