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

[ISSUE #4785] Condition check for source worker #4786

Merged
merged 3 commits into from
Mar 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.apache.eventmesh.openconnect.offsetmgmt.api.storage.OffsetStorageWriterImpl;
import org.apache.eventmesh.openconnect.util.CloudEventUtil;
import org.apache.eventmesh.spi.EventMeshExtensionFactory;
import org.apache.eventmesh.common.protocol.tcp.OPStatus;

import org.apache.commons.collections4.CollectionUtils;

Expand Down Expand Up @@ -196,7 +197,7 @@ public void startPollAndSend() {
while (retryTimes < MAX_RETRY_TIMES) {
try {
Package sendResult = eventMeshTCPClient.publish(event, 3000);
if (sendResult.getHeader().getCode() == 0) {
if (sendResult.getHeader().getCode() == OPStatus.SUCCESS.getCode()) {
// publish success
// commit record
this.source.commit(connectRecord);
Expand Down
Loading