Skip to content

Commit

Permalink
add for test
Browse files Browse the repository at this point in the history
  • Loading branch information
xwm1992 committed Aug 20, 2024
1 parent f3eacde commit 8e885bf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

import dev.failsafe.Failsafe;
import dev.failsafe.RetryPolicy;
import org.apache.eventmesh.openconnect.offsetmgmt.api.data.ConnectRecord;


/**
Expand Down Expand Up @@ -75,7 +76,7 @@ public void start() {
* @return processing chain
*/
@Override
public Future<HttpResponse<Buffer>> deliver(URI url, HttpConnectRecord httpConnectRecord, Map<String, Object> attributes) {
public Future<HttpResponse<Buffer>> deliver(URI url, HttpConnectRecord httpConnectRecord, Map<String, Object> attributes, ConnectRecord connectRecord) {

// Build the retry policy
RetryPolicy<HttpResponse<Buffer>> retryPolicy = RetryPolicy.<HttpResponse<Buffer>>builder()
Expand Down Expand Up @@ -104,7 +105,7 @@ public Future<HttpResponse<Buffer>> deliver(URI url, HttpConnectRecord httpConne

// Handle the ConnectRecord with retry policy
Failsafe.with(retryPolicy)
.getStageAsync(() -> sinkHandler.deliver(url, httpConnectRecord, attributes).toCompletionStage());
.getStageAsync(() -> sinkHandler.deliver(url, httpConnectRecord, attributes, connectRecord).toCompletionStage());

return null;
}
Expand Down

0 comments on commit 8e885bf

Please sign in to comment.