Skip to content

Commit 9d0816e

Browse files
committed
grpc batchpublish API
1 parent 0be7fd0 commit 9d0816e

File tree

14 files changed

+3219
-56
lines changed

14 files changed

+3219
-56
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.eventmesh.common.protocol.grpc.common;
19+
20+
import org.apache.eventmesh.common.protocol.ProtocolTransportObject;
21+
import org.apache.eventmesh.common.protocol.grpc.protos.BatchMessage;
22+
23+
public class BatchMessageWrapper implements ProtocolTransportObject {
24+
25+
private BatchMessage batchMessage;
26+
27+
public BatchMessageWrapper(BatchMessage batchMessage) {
28+
this.batchMessage = batchMessage;
29+
}
30+
31+
public BatchMessage getMessage() {
32+
return batchMessage;
33+
}
34+
}

eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/StatusCode.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public enum StatusCode {
2828
EVENTMESH_PROTOCOL_BODY_ERR("7", "eventMesh protocol[body] err, "),
2929
EVENTMESH_STOP("8", "eventMesh will stop or had stopped, "),
3030
EVENTMESH_REJECT_BY_PROCESSOR_ERROR("9", "eventMesh reject by processor error, "),
31-
EVENTMESH_BATCH_PRODUCER_STOPED_ERR("10", "eventMesh batch msg producer stopped, "),
31+
EVENTMESH_BATCH_PUBLISH_ERR("10", "eventMesh batch publish messages error, "),
3232
EVENTMESH_SEND_BATCHLOG_MSG_ERR("17", "eventMesh send batchlog msg err, "),
3333
EVENTMESH_BATCH_SPEED_OVER_LIMIT_ERR("11", "eventMesh batch msg speed over the limit, "),
3434
EVENTMESH_PACKAGE_MSG_ERR("12", "eventMesh package msg err, "),

0 commit comments

Comments
 (0)