generated from Miragon/miranum-connect-basic-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
Empty file.
20 changes: 20 additions & 0 deletions
20
example/example-core/src/main/java/io/miragon/example/adapter/out/MiranumMessageAdapter.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,20 @@ | ||
package io.miragon.example.adapter.out; | ||
|
||
import io.miragon.example.application.port.out.SendMessagePort; | ||
import io.miragon.miranum.connect.message.api.CorrelateMessageCommand; | ||
import io.miragon.miranum.connect.message.api.MessageApi; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
import java.util.Map; | ||
|
||
@RequiredArgsConstructor | ||
public class MiranumMessageAdapter implements SendMessagePort { | ||
|
||
private final MessageApi messageApi; | ||
|
||
@Override | ||
public void sendMessage(String messageName, String key, Map<String, Object> data) { | ||
var command = new CorrelateMessageCommand(messageName, key, data); | ||
messageApi.correlateMessage(command); | ||
} | ||
} |
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