gRPC Quickstart
Overview
In this brief quickstart guide, we will demonstrate how to communicate with plumber
's gRPC API using grpcurl
.
Install grpcurl
First install grpcurl
(if you don't already have it).
Start server
It will take a few moments for plumber
to initialize.
Clone plumber-schemas Repo
Now git clone
the Plumber protobuf repository:
Open a terminal and navigate to plumber-schemas/protos/
directory:
Verify
Execute our first command calling the GetAllConnections()
method:
Great! Plumber server is running correctly!
Create a New Connection
Add a connection to our local Kafka server using the CreateConnection()
method. We will use the returned connectionId
for creating a relay
.
Create a Relay
Now that we've created our first stored connection, we can start relaying messages from it into a Batch.sh collection using the CreateRelay()
method.
The important fields to specify here are collection_token
, connection_id
, and topics.
You will need to copy the connection ID from the previous call into the request's connection_id
field, and fill in collection_token
with a Batch.sh collection token.
Success! 🎉.
We are now relaying all events from exampletopic
topic in our local Kafka instance to our Batch.sh collection!
Stop the Relay
Now let's stop our relay and conclude this quick start:
Last updated