gRPC Connector
The Anypoint Connector for gRPC provides a high-performance framework for connecting Mule applications to external gRPC services.
home
The Anypoint Connector for gRPC provides a high-performance framework for connecting Mule applications to external gRPC services. By leveraging Protocol Buffers (protobuf) as the interface definition language and data serialization mechanism, the connector enables efficient, low-latency communication between microservices. It supports the execution of remote procedure calls (RPCs) with strongly-typed request and response messages, allowing developers to integrate modern distributed systems and polyglot microservices into their Mule flows with minimal overhead.
Key Features
- Protobuf Integration: Automatically generates metadata and message structures based on uploaded
.protodefinition files. - Bi-directional Streaming: Supports unary, server-streaming, client-streaming, and bi-directional streaming communication patterns.
- High-Performance Transport: Utilizes HTTP/2 as the transport protocol to ensure efficient header compression and multiplexing.
- Secure Communication: Provides built-in support for Transport Layer Security (TLS) to encrypt data in transit between the Mule app and gRPC server.
- Custom Headers: Allows for the passing of dynamic metadata and custom headers to support authentication and tracing across service boundaries.
Supported Operations
Client Operations
- [Client] Unary: Executes a standard synchronous RPC call where the client sends a single request and receives a single response.
- [Client] Server Stream Message: Initiates a request to a server-streaming RPC. This operation sends a single request, while the multiple resulting responses are handled by a delegated listener via a Routing ID.
- [Client] Client Stream Message: Connects to a client-streaming RPC. This operation is used to send a sequence of messages to the server and can be configured to signal the end of the stream.
- [Client] Bidirectional Stream Message: Connects to a bidirectional streaming RPC. This operation initiates a request, sends payloads, and manages the up-stream lifecycle.
Server Operations and Sources
- [Server] Respond Server Stream Message: Used within a server-side flow to send individual messages back to the client during a streaming session.
- [Server] End Stream: Explicitly signals the completion of a response stream from the server side to the client.
- [Server] Unary Listener: Acts as an entry point for a Mule flow to function as a gRPC server for unary (single request/response) calls.
- [Server] Client Stream Listener: Acts as an entry point for a Mule flow to function as a gRPC server receiving a stream of messages from a client.
- [Server] Server Stream Listener: Acts as an entry point for a Mule flow to function as a gRPC server where the client sends one request and the Mule flow returns a stream.
- [Server] Bidirectional Streaming Listener: Acts as an entry point for a Mule flow to function as a gRPC server handling full-duplex communication where both client and server send streams of messages.