Skip to content
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

Merged
merged 77 commits into from
Dec 19, 2022
Merged
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
fad16b2
Connection type 'Hono' introduced
abalarev May 30, 2022
9af8a4f
HonoConfig introduced to provide properties for the new Hono-connecti…
abalarev May 30, 2022
448d5a2
DefaultHonoConfig and conf files update
abalarev Jun 7, 2022
70b47d1
Config values added
abalarev Jun 7, 2022
1029377
Redundant file removed
abalarev Jun 8, 2022
16f3da6
HonoCredentials taken from static configuration
abalarev Jun 13, 2022
000b333
Config refactored
abalarev Jun 17, 2022
845d7b8
Config refactored
abalarev Jun 22, 2022
70386d0
Connection "enrichment"
abalarev Jun 24, 2022
c70c88b
CR-11462 Add HonoValidator impl and Junit tests
SilviaGeorgievaLyoteva Jun 29, 2022
455891a
Connection "enrichment"
abalarev Jul 5, 2022
6db9090
Merge remote-tracking branch 'origin/feature/Hono_connection_type' in…
abalarev Jul 5, 2022
7b72bee
Fixed HonoValidator merge issues
abalarev Jul 5, 2022
9426aec
Hono-connection enrichment fixed
abalarev Jul 6, 2022
fba66b9
ConfigValues renamed to HonoConfigValue, minor fixes
abalarev Jul 6, 2022
ba5b81a
Review issues fixes, unit tests fixed
abalarev Jul 7, 2022
6a5aee5
Review issues fixes, unit tests fixed
abalarev Jul 7, 2022
e675897
DefaultHonoConfig class moved from api to service, URI init fixed
abalarev Jul 13, 2022
0b11f79
Merge remote-tracking branch 'origin/master' into feature/Hono_connec…
abalarev Jul 13, 2022
0fecea7
Merge remote-tracking branch 'origin/feature/Hono_connection_type' in…
Jul 14, 2022
cda7bb5
Minor refactoring of ConfigWithFallback.
Jul 19, 2022
a843974
Streamline behaviour of DefaultScopedConfig in case of an unknown enu…
Jul 19, 2022
09907a9
Refactored HonoConfig.
Jul 19, 2022
710f818
Connection enrichment refactored, HonoConfig cleaned up.
abalarev Jul 20, 2022
c59a028
Refactored `HonoAddressAlias` and added unit tests.
Jul 21, 2022
0391f92
Refactored `HonoValidator` and adjusted unit tests.
Jul 22, 2022
c86312f
Unit tests created
abalarev Jul 25, 2022
53da031
Merge remote-tracking branch 'origin/feature/Hono_connection_type' in…
Jul 27, 2022
111c99a
Fixed compilation errors of `HonoConnectionFactoryTest`.
Jul 27, 2022
fca7c19
Cleaned up `HonoConfig`.
Aug 4, 2022
9d9705e
Refactored `HonoConnectionFactory`.
Aug 4, 2022
495f8b2
Merge branch 'master' into feature/Hono_connection_type
Aug 8, 2022
766b2dc
Reordered import.
Aug 10, 2022
059f619
Further simplified `HonoAddressAlias`.
Aug 10, 2022
6e73c74
Fixed unit test.
Aug 10, 2022
b46e333
Moved back method for getting `HonoAddressAlias` by alias value to th…
Aug 10, 2022
2c01aef
Made `HonoConnectionFactory` a `DittoExtensionPoint`.
Aug 10, 2022
0bfe490
newInstance() method added to UserPasswordCredentials class
abalarev Aug 12, 2022
5ee0c6e
Merge branch 'master' into feature/Hono_connection_type
Yannic92 Aug 29, 2022
69ee5af
replyTargetEnabled bug in ImmutableSource fixed
abalarev Aug 31, 2022
136af98
Custom `headerMappings` and custom `groupId` in `specificConfig` allo…
abalarev Sep 2, 2022
91b4804
groupId handling changed
abalarev Sep 15, 2022
fb0ae41
Hono-credentials added to connectivity-extension.conf
abalarev Oct 4, 2022
26902a5
retrieveHonoConnection piggyback command introduced.
abalarev Oct 4, 2022
b1845b6
Automatic reconnect of 'hono' connection after credentials are changed.
abalarev Oct 4, 2022
36e1e13
Copyright headers fixes
abalarev Oct 5, 2022
5079f38
Javadoc improved.
abalarev Oct 5, 2022
b790173
Merge remote-tracking branch 'origin/master' into feature/Hono_connec…
abalarev Oct 5, 2022
5b7f415
some fixes after merge
abalarev Oct 6, 2022
ec67d80
Integrate Hono connection in ditto ConnectionRoute
SilviaGeorgievaLyoteva Oct 6, 2022
f34165d
Merge remote-tracking branch 'origin/master' into feature/Hono_connec…
abalarev Oct 7, 2022
60ea7fd
Hono-connection resolving added for TestConnection (dry-run)
abalarev Oct 12, 2022
a117a57
Merge remote-tracking branch 'origin/master' into feature/Hono_connec…
abalarev Oct 12, 2022
5c5564e
HubParamsModified renamed to HubInstanceInfoModified, few logs added
abalarev Oct 13, 2022
29fd5a3
CR-11683 Bug fixed in handling of 'Event'
abalarev Oct 13, 2022
1886e85
Review issues fixes.
abalarev Oct 17, 2022
5f2ec1c
Automatic reconnect fixed to filter hono-connections only
abalarev Oct 19, 2022
3ff0fe9
Auto-reconnect review issues fixed.
abalarev Oct 21, 2022
b4a0e76
Revert ConnectionRoute to origin/master and change REST API documenta…
SilviaGeorgievaLyoteva Oct 21, 2022
6f7adeb
Reverted ConnectionRoute to origin/master
SilviaGeorgievaLyoteva Oct 21, 2022
57703cc
Javadoc fixed
abalarev Oct 21, 2022
f49fb66
More review issues fixed.
abalarev Oct 24, 2022
9b38b8d
Changed ConnectionId.generateRandom()
SilviaGeorgievaLyoteva Oct 24, 2022
d5c9add
Introduce dedicated implementation of HonoConnection
SilviaGeorgievaLyoteva Oct 25, 2022
79c237b
Merge remote-tracking branch 'origin/master' into feature/Hono_connec…
abalarev Oct 31, 2022
e649ad0
Fixed HonoConnection implementation and added HonoConnection test
SilviaGeorgievaLyoteva Nov 2, 2022
83ca606
Introduce AbstractConnection and AbstractConnectionBuilder
SilviaGeorgievaLyoteva Nov 24, 2022
37cdff1
Hono connection default config kafka parameters changed
abalarev Nov 24, 2022
ca276e5
Merge remote-tracking branch 'origin/master' into feature/Hono_connec…
abalarev Nov 24, 2022
ef5d05c
Unit test fixed
abalarev Nov 24, 2022
baecbb1
Removed empty rows, checked for hono conn. type in getConnectionTypeO…
SilviaGeorgievaLyoteva Dec 1, 2022
83315d6
Documentation updated regarding Hono connection
abalarev Dec 2, 2022
100fe3d
Fixed copyright headers
abalarev Dec 9, 2022
e4369c9
Fixed review issues in connectivity-protocol-bindings-hono.md
abalarev Dec 12, 2022
2c4663d
Merge remote-tracking branch 'origin/master' into feature/Hono_connec…
abalarev Dec 12, 2022
4444087
Copyright headers
abalarev Dec 12, 2022
ff46662
adjust since tags in javadoc to Ditto version 3.2.0
thjaeckle Dec 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DefaultHonoConfig and conf files update
Signed-off-by: Andrey Balarev <andrey.balarev@bosch.io>
  • Loading branch information
abalarev committed Jun 7, 2022
commit 448d5a25df3637fd5ac3f95cbbfd0155f694e0ea
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.ditto.connectivity.api;
import com.typesafe.config.Config;
import akka.actor.ActorSystem;
public final class DefaultHonoConfig implements HonoConfig {

private final String baseUri;

private final String telemetryAddress;
private final String eventAddress;
private final String commandAndControlAddress;
private final String commandResponseAddress;

private final String username;
private final String password;

public DefaultHonoConfig(final ActorSystem actorSystem) {
final Config config = actorSystem.settings().config().getConfig(PREFIX);
this.baseUri = config.getString(ConfigValues.BASE_URI.getConfigPath());
this.telemetryAddress = config.getString(ConfigValues.TELEMETRY_ADDRESS.getConfigPath());
this.eventAddress = config.getString(ConfigValues.EVENT_ADDRESS.getConfigPath());
this.commandAndControlAddress = config.getString(ConfigValues.COMMAND_AND_CONTROL_ADDRESS.getConfigPath());
this.commandResponseAddress = config.getString(ConfigValues.COMMAND_RESPONSE_ADDRESS.getConfigPath());
this.username = config.getString(ConfigValues.USERNAME.getConfigPath());
this.password = config.getString(ConfigValues.PASSWORD.getConfigPath());
}

@Override
public String getBaseUri() {
return baseUri;
}

public String getTelemetryAddress() {
return telemetryAddress;
}

public String getEventAddress() {
return eventAddress;
}

public String getCommandAndControlAddress() {
return commandAndControlAddress;
}

public String getCommandResponseAddress() {
return commandResponseAddress;
}
public String getUsername() {
return username;
}

public String getPassword() {
return password;
}
}
14 changes: 12 additions & 2 deletions connectivity/service/src/main/resources/connectivity.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
hono-connection {
config-provider = "org.eclipse.ditto.connectivity.api.HonoConfigDefault",
config-provider = "org.eclipse.ditto.connectivity.api.DefaultHonoConfig",
config-provider = ${?HONO_CONNECTION_CONFIG_PROVIDER}
base-uri = "localhost:9990"

base-uri = "tcp://localhost:9990"
base-uri = ${?HONO_CONNECTION_URI}
telemetry = "telemetry/..."
telemetry = ${?HONO_CONNECTION_TELEMETRY_ADDRESS}
event = "event/..."
event = ${?HONO_CONNECTION_EVENT_ADDRESS}
commandAndControl = "command/..."
commandAndControl = ${?HONO_CONNECTION_COMMAND_ADDRESS}
commandResponse = "response/..."
commandResponse = ${?HONO_CONNECTION_RESPONSE_ADDRESS}

}

ditto {
14 changes: 12 additions & 2 deletions gateway/service/src/main/resources/gateway.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
hono-connection {
config-provider = "org.eclipse.ditto.connectivity.api.HonoConfigDefault",
config-provider = "org.eclipse.ditto.connectivity.api.DefaultHonoConfig",
config-provider = ${?HONO_CONNECTION_CONFIG_PROVIDER}
base-uri = "localhost:9990"

base-uri = "tcp://localhost:9990"
base-uri = ${?HONO_CONNECTION_URI}
telemetry = "telemetry/..."
telemetry = ${?HONO_CONNECTION_TELEMETRY_ADDRESS}
event = "event/..."
event = ${?HONO_CONNECTION_EVENT_ADDRESS}
commandAndControl = "command/..."
commandAndControl = ${?HONO_CONNECTION_COMMAND_ADDRESS}
commandResponse = "response/..."
commandResponse = ${?HONO_CONNECTION_RESPONSE_ADDRESS}

}

ditto {