Ditto 1.5.0 is API and binary compatible to prior Eclipse Ditto 1.x versions.
Changelog
Compared to the latest release 1.4.0, the following changes, new features and bugfixes were added.
Changes
Negatively settling processed AMQP 1.0 messages changed to rejected
In previous versions, Ditto negatively settled messages consumed via AMQP 1.0 which could not be applied to Ditto
(e.g. because the received message could not be understood or permissions were missing) with modified[undeliverable-here]
.
This was changed to settle with rejected
(see AMQP 1.0 spec)
instead, as this is the more correct settlement outcome.
MongoDB for unit tests was increased to version 4.2
Prior to Ditto 1.5.0, the unit tests still were done against MongoDB version 3.6 which reaches end-of-life in April 2021.
Config files consolidation
No special -cloud.conf
and -docker.conf
config files are needed any longer, there are only special config files
ending with -dev.conf
which contain configuration in order to start Eclipse Ditto e.g. locally in an IDE.
New features
Header mapping for Feature ID in connectivity
Feature IDs may now be used as placeholders in Connectivity header mappings.
Addition of “desired” feature properties in model and APIs
A feature which was long on the roadmap of Eclipse Ditto is the ability to distinguish between reported and desired twin state.
“reported” twin state can be seen as data/state coming from the actual device (the current “truth”) whereas the “desired” state is something an application in the backend or a mobile app would set as the new requested target state for a property.
This issue layed the foundation by creating the model and the APIs in order to manage those desiredProperties
.
Issuing “weak acknowledgements” when a command requesting acks was filtered out
When using acknowledgements in order to guarantee “at least once” (QoS 1) delivery and scenarios like:
- a subscriber that declared an ack label requested by the publisher is not authorized to receive a published signal
- or: a subscriber that declared an ack label requested by the publisher discards the published signal due to namespace or RQL filtering
resending the signal will not help. Ditto now emits a “weak acknowledgement” for such cases that does not trigger redelivery.
Ditto internal pub/sub supports using a “grouping” concept
A “group” concept was added to Ditto pub/sub:
- Subscribers may subscribe with a group name.
- Published signals are delivered to exactly 1 subscriber within each group chosen consistently according to the entity ID.
With this feature, the event publishing at connections will scale with the number of client actors by having the client actors subscribe for events directly using the connection ID as group.
Addition of “cloudevents” HTTP endpoint
While cloud events provide bindings for Kafka, MQTT, … they also have an HTTP endpoint binding, which can easily be used in the combination with Knative.
With addition of a new HTTP endpoint /cloudevents
, it is now possible to easily map incoming messages from any
Knative eventing source to Eclipse Ditto, acting as a Knative eventing sink.
A special thanks to Jens Reimann (ctron) from RedHat for this addition to Eclipse Ditto.
Bugfixes
Several bugs in Ditto 1.4.0 were fixed for 1.5.0.
This is a complete list of the
merged pull requests, including the fixed bugs.
Here as well for the Ditto Java Client: merged pull requests
Fix that sending messages with non-existing “value” was not possible via HTTP endpoints
The HTTP /messages
endpoints did not allow that a Ditto Protocol messages with non-existing "value"
were created for
HTTP invocations which did not include payload at all.
That was fixed in the way that for requests with Content-Length: 0
the "value"
is now removed from the resulting
Ditto Protocol message instead of being "value": ""
(empty JSON string).
Ditto Java client: When starting consumption with invalid filter, wrongly timeout exception is propagate to the user
dittoClient.twin().startConsumption(org.eclipse.ditto.client.options.Options.Consumption.filter("invalidFilter"))
throwed a wrong exception and did not propagate the real error to the user.
Affected Ditto PR.
Ditto Java client: Fix FeatureChange consumption for specific feature change-registration
This fixes a bug that caused ignoring features in a FeatureChange for change-registrations on single features, when only a single subpath exists in the feature (i.e. feature with only properties).
Migration notes
MongoDB hostname configuration
Due to the consolidation of config files, it is now required to configure
the MongoDB hostname
explicitly as the default hostname was changed to localhost
.
Previously, this hostname was automatically set to mongodb
(which is the hostname of the MongoDB when e.g. the
docker-compose.yaml
deployment is used) in Docker based environments.
This now has to be manually done via the environment variable MONGO_DB_HOSTNAME
.
The default docker-compose.yaml
was also adjusted accordingly:
docker-compose.yml