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

End-2-end acks for Ditto Java Client #56

Merged
merged 27 commits into from
Apr 27, 2020

Conversation

thjaeckle
Copy link
Member

Relates to eclipse-ditto/ditto#611

Adds end-2-end acknowledgement support to the Ditto Java Client:

  • adds possibility to acknowledge received events from Ditto (Changes in the Client)
  • adds possiblity to request acknowledgements when modifying Ditto twins

thjaeckle and others added 26 commits February 26, 2020 09:34
….xml in order to have it included in required bundles

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
* Added missing null-checks.
* Removed superfluous null-checks to make fluent API more fluent.
* Made constructors private as the builder should not be directly instantiated.

Signed-off-by: Juergen Fickel <juergen.fickel@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…the "ditto-signals-acks" module in 2

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…e_ack

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…akage check

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…onal header, use it in the local sessionId, otherwise send along the generated local session id as "correlation-id" header and therefore client session identifier

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…custom "acknowledgements" whenever processing "Changes" (which are created from subscribed ThingEvents)

* enhanced Change by extending WithDittoHeaders
* added a TODO to solve once the search is added to the Ditto Client in order to reduce merge conflicts

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…he possibility to specify DittoHeaders as Options

* supported handling "Acknowledgements" CommandResponses and extract the "twin-persisted" part of them interpreting them as "normal" CommandResponse
* renamed sendSignal() to emitSignal() in MessagingProvider to use the same term as in search feature branch

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>

Conflicts:
	java/src/main/java/org/eclipse/ditto/client/changes/internal/ImmutableThingChange.java
	java/src/main/java/org/eclipse/ditto/client/configuration/WebSocketMessagingConfiguration.java
	java/src/main/java/org/eclipse/ditto/client/internal/CommonManagementImpl.java
	java/src/main/java/org/eclipse/ditto/client/internal/DefaultDittoClient.java
	java/src/main/java/org/eclipse/ditto/client/internal/SendTerminator.java
	java/src/main/java/org/eclipse/ditto/client/management/internal/FeatureHandleImpl.java
	java/src/main/java/org/eclipse/ditto/client/messaging/MessagingProvider.java
	java/src/main/java/org/eclipse/ditto/client/messaging/internal/WebSocketMessagingProvider.java
	java/src/test/java/org/eclipse/ditto/client/internal/SendTerminatorTest.java
	java/src/test/java/org/eclipse/ditto/client/messaging/mock/MockMessagingProvider.java
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…t.testEventAcknowledgement test as `channel` can't be "live" due to assertJ Assumption

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
… feature + attribute commands as well

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
… by specificity; remove unreachable branch; add a test for feature acknowledgement requests.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…to their status code.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…imeException

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…ons.headers()

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…amples

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
…ded when sending/replying to a message

* fixed critical bug in PendingMessageImpl which caused a non-visible ClassCastException for message responses using the typed message send() API

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
@yufei-cai
Copy link
Contributor

Should build after merging eclipse-ditto/ditto#655

…ls-acks-things is required

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
@thjaeckle thjaeckle merged commit 71c29a4 into eclipse-ditto:master Apr 27, 2020
@thjaeckle thjaeckle deleted the feature/e2e_ack branch April 27, 2020 10:08
@thjaeckle thjaeckle added this to the 1.1.0 milestone Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants