-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3357 from ingef/fix/action-reaction-multiple-mess…
…ages-handling adds finalize message to support multiple ReactionMessage per worker
- Loading branch information
Showing
6 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...ava/com/bakdata/conquery/models/messages/namespaces/specific/FinalizeReactionMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.bakdata.conquery.models.messages.namespaces.specific; | ||
|
||
import java.util.UUID; | ||
|
||
import com.bakdata.conquery.io.cps.CPSType; | ||
import com.bakdata.conquery.models.identifiable.ids.specific.WorkerId; | ||
import com.bakdata.conquery.models.messages.ReactionMessage; | ||
import com.bakdata.conquery.models.messages.namespaces.NamespaceMessage; | ||
import com.bakdata.conquery.models.messages.namespaces.NamespacedMessage; | ||
import com.bakdata.conquery.models.worker.DistributedNamespace; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@CPSType(id = "FINALIZE_REACTION_MESSAGE", base = NamespacedMessage.class) | ||
@AllArgsConstructor(onConstructor_ = @JsonCreator) | ||
@Getter | ||
@Slf4j | ||
@ToString | ||
public class FinalizeReactionMessage extends NamespaceMessage implements ReactionMessage { | ||
|
||
private UUID callerId; | ||
|
||
private WorkerId workerId; | ||
|
||
@Override | ||
public boolean lastMessageFromWorker() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void react(DistributedNamespace context) throws Exception { | ||
log.debug("Received finalize message from caller '{}' workerId '{}'", callerId, workerId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters