These example shows how to use the Client to manage Things, Attributes/Features, register for changes on your Things and send messages. You can find more information about the Client in our Documentation.
The following background knowledge is required for this example
- Java 8 (In order to use Java 9 and above, please use the Build and run for Java 9 and above section)
- Maven
- Docker
- Publish–subscribe pattern
- Eclipse Ditto
The examples are preconfigured to work with a local Eclipse Ditto running in Docker. Find more information on GitHub.
You can change the configuration to your liking by editing src/main/resources/config.properties.
The configured usernames and passwords must be added to the nginx.htpasswd of Eclipse Ditto.
htpasswd nginx.htpasswd user1Start Eclipse Ditto:
docker-compose up -dBuild and run an Example (e.g. RegisterForChanges):
mvn compile exec:java -Dexec.mainClass="org.eclipse.ditto.examples.changes.RegisterForChanges"