类 MessagingServiceGrpc.MessagingServiceStub
- java.lang.Object
-
- io.grpc.stub.AbstractStub<S>
-
- io.grpc.stub.AbstractAsyncStub<MessagingServiceGrpc.MessagingServiceStub>
-
- apache.rocketmq.v2.MessagingServiceGrpc.MessagingServiceStub
-
- 封闭类:
- MessagingServiceGrpc
public static final class MessagingServiceGrpc.MessagingServiceStub extends io.grpc.stub.AbstractAsyncStub<MessagingServiceGrpc.MessagingServiceStub>
For all the RPCs in MessagingService, the following error handling policies apply: If the request doesn't bear a valid authentication credential, return a response with common.status.code == `UNAUTHENTICATED`. If the authenticated user is not granted with sufficient permission to execute the requested operation, return a response with common.status.code == `PERMISSION_DENIED`. If the per-user-resource-based quota is exhausted, return a response with common.status.code == `RESOURCE_EXHAUSTED`. If any unexpected server-side errors raise, return a response with common.status.code == `INTERNAL`.
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidackMessage(AckMessageRequest request, io.grpc.stub.StreamObserver<AckMessageResponse> responseObserver)Acknowledges the message associated with the `receipt_handle` or `offset` in the `AckMessageRequest`, it means the message has been successfully processed.protected MessagingServiceGrpc.MessagingServiceStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions)voidchangeInvisibleDuration(ChangeInvisibleDurationRequest request, io.grpc.stub.StreamObserver<ChangeInvisibleDurationResponse> responseObserver)Once a message is retrieved from consume queue on behalf of the group, it will be kept invisible to other clients of the same group for a period of time.voidendTransaction(EndTransactionRequest request, io.grpc.stub.StreamObserver<EndTransactionResponse> responseObserver)Commits or rollback one transactional message.voidforwardMessageToDeadLetterQueue(ForwardMessageToDeadLetterQueueRequest request, io.grpc.stub.StreamObserver<ForwardMessageToDeadLetterQueueResponse> responseObserver)Forwards one message to dead letter queue if the max delivery attempts is exceeded by this message at client-side, return `OK` if success.voidheartbeat(HeartbeatRequest request, io.grpc.stub.StreamObserver<HeartbeatResponse> responseObserver)Producer or consumer sends HeartbeatRequest to servers periodically to keep-alive.voidnotifyClientTermination(NotifyClientTerminationRequest request, io.grpc.stub.StreamObserver<NotifyClientTerminationResponse> responseObserver)Notify the server that the client is terminated.voidqueryAssignment(QueryAssignmentRequest request, io.grpc.stub.StreamObserver<QueryAssignmentResponse> responseObserver)Queries the assigned route info of a topic for current consumer, the returned assignment result is decided by server-side load balancer.voidqueryRoute(QueryRouteRequest request, io.grpc.stub.StreamObserver<QueryRouteResponse> responseObserver)Queries the route entries of the requested topic in the perspective of the given endpoints.voidreceiveMessage(ReceiveMessageRequest request, io.grpc.stub.StreamObserver<ReceiveMessageResponse> responseObserver)Receives messages from the server in batch manner, returns a set of messages if success.voidsendMessage(SendMessageRequest request, io.grpc.stub.StreamObserver<SendMessageResponse> responseObserver)Delivers messages to brokers.io.grpc.stub.StreamObserver<TelemetryCommand>telemetry(io.grpc.stub.StreamObserver<TelemetryCommand> responseObserver)Once a client starts, it would immediately establishes bi-lateral stream RPCs with brokers, reporting its settings as the initiative command.
-
-
-
方法详细资料
-
build
protected MessagingServiceGrpc.MessagingServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
- 指定者:
build在类中io.grpc.stub.AbstractStub<MessagingServiceGrpc.MessagingServiceStub>
-
queryRoute
public void queryRoute(QueryRouteRequest request, io.grpc.stub.StreamObserver<QueryRouteResponse> responseObserver)
Queries the route entries of the requested topic in the perspective of the given endpoints. On success, servers should return a collection of addressable message-queues. Note servers may return customized route entries based on endpoints provided. If the requested topic doesn't exist, returns `NOT_FOUND`. If the specific endpoints is empty, returns `INVALID_ARGUMENT`.
-
heartbeat
public void heartbeat(HeartbeatRequest request, io.grpc.stub.StreamObserver<HeartbeatResponse> responseObserver)
Producer or consumer sends HeartbeatRequest to servers periodically to keep-alive. Additionally, it also reports client-side configuration, including topic subscription, load-balancing group name, etc. Returns `OK` if success. If a client specifies a language that is not yet supported by servers, returns `INVALID_ARGUMENT`
-
sendMessage
public void sendMessage(SendMessageRequest request, io.grpc.stub.StreamObserver<SendMessageResponse> responseObserver)
Delivers messages to brokers. Clients may further: 1. Refine a message destination to message-queues which fulfills parts of FIFO semantic; 2. Flag a message as transactional, which keeps it invisible to consumers until it commits; 3. Time a message, making it invisible to consumers till specified time-point; 4. And more... Returns message-id or transaction-id with status `OK` on success. If the destination topic doesn't exist, returns `NOT_FOUND`.
-
queryAssignment
public void queryAssignment(QueryAssignmentRequest request, io.grpc.stub.StreamObserver<QueryAssignmentResponse> responseObserver)
Queries the assigned route info of a topic for current consumer, the returned assignment result is decided by server-side load balancer. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the specific endpoints is empty, returns `INVALID_ARGUMENT`.
-
receiveMessage
public void receiveMessage(ReceiveMessageRequest request, io.grpc.stub.StreamObserver<ReceiveMessageResponse> responseObserver)
Receives messages from the server in batch manner, returns a set of messages if success. The received messages should be acked or redelivered after processed. If the pending concurrent receive requests exceed the quota of the given consumer group, returns `UNAVAILABLE`. If the upstream store server hangs, return `DEADLINE_EXCEEDED` in a timely manner. If the corresponding topic or consumer group doesn't exist, returns `NOT_FOUND`. If there is no new message in the specific topic, returns `OK` with an empty message set. Please note that client may suffer from false empty responses. If failed to receive message from remote, server must return only one `ReceiveMessageResponse` as the reply to the request, whose `Status` indicates the specific reason of failure, otherwise, the reply is considered successful.
-
ackMessage
public void ackMessage(AckMessageRequest request, io.grpc.stub.StreamObserver<AckMessageResponse> responseObserver)
Acknowledges the message associated with the `receipt_handle` or `offset` in the `AckMessageRequest`, it means the message has been successfully processed. Returns `OK` if the message server remove the relevant message successfully. If the given receipt_handle is illegal or out of date, returns `INVALID_ARGUMENT`.
-
forwardMessageToDeadLetterQueue
public void forwardMessageToDeadLetterQueue(ForwardMessageToDeadLetterQueueRequest request, io.grpc.stub.StreamObserver<ForwardMessageToDeadLetterQueueResponse> responseObserver)
Forwards one message to dead letter queue if the max delivery attempts is exceeded by this message at client-side, return `OK` if success.
-
endTransaction
public void endTransaction(EndTransactionRequest request, io.grpc.stub.StreamObserver<EndTransactionResponse> responseObserver)
Commits or rollback one transactional message.
-
telemetry
public io.grpc.stub.StreamObserver<TelemetryCommand> telemetry(io.grpc.stub.StreamObserver<TelemetryCommand> responseObserver)
Once a client starts, it would immediately establishes bi-lateral stream RPCs with brokers, reporting its settings as the initiative command. When servers have need of inspecting client status, they would issue telemetry commands to clients. After executing received instructions, clients shall report command execution results through client-side streams.
-
notifyClientTermination
public void notifyClientTermination(NotifyClientTerminationRequest request, io.grpc.stub.StreamObserver<NotifyClientTerminationResponse> responseObserver)
Notify the server that the client is terminated.
-
changeInvisibleDuration
public void changeInvisibleDuration(ChangeInvisibleDurationRequest request, io.grpc.stub.StreamObserver<ChangeInvisibleDurationResponse> responseObserver)
Once a message is retrieved from consume queue on behalf of the group, it will be kept invisible to other clients of the same group for a period of time. The message is supposed to be processed within the invisible duration. If the client, which is in charge of the invisible message, is not capable of processing the message timely, it may use ChangeInvisibleDuration to lengthen invisible duration.
-
-