layout | title | categories | author | lang |
---|---|---|---|---|
post |
Getting started with OVH Queue DBaaS |
queue |
guillaumebreton |
en |
Welcome to the getting started guide of the OVH Queue DBaaS. This guide will help you to understand the core concepts behind the OVH Queue DBaaS and how to produce your first message to the platform and consume it.
It provides you a shared queuing system based on Apache Kafka.
It powers fast, scalable and global low-latency messaging allowing you to connect anything to everything.
It is a solution to send and receive messages between independent applications, to decouple systems and components or to connect, build, and scale realtime applications.
Kafka is a high-throughput, distributed, publish-subscribe messaging system. It allows you to connect producers and consumers through topics with fault tolerance as well as journalized events. All messages are persisted on disk and replicated within the cluster to prevent data loss.
Kafka maintains feeds of messages in topics. Producers write data to topics and consumers read from topics. Since Kafka is a distributed system, topics are partitioned and replicated across multiple nodes. Each message in a partition is assigned a unique offset. A consumer can save its offset position to remember the messages read.
The OVH Queue DBaaS has been built so that you can connect painlessly to it. Topics are automatically created at the first request and a partitioning strategy (3 partitionis per topic) is applied by default.
Before starting to use the Queue DBaaS lab you need to make sure that you have an OVH.com account.
Go to ovh.com and select "Create Account".
The first step to use OVH Queue DBaaS is to create an application.
-
Go to the Queue DBaaS lab page and click on the Start Now button.
-
Follow the order steps. You will receive an email as soon as your application is ready.
-
Go to the OVH Manager.
-
In the Sunrise manager, a new 'Not configured app' is available under the Queue DBaaS section.
-
Select the application. Choose its name, select a region and save it.
Once your application is created and configured, you will need a key to be able to write and read data.
-
In the previously created app, click on the new key button.
-
Give it a name.
-
Save the generated key in your secrets (the key is only displayed once. If you forget it you can regenerate it.)
Important: to be authenticated to the Queue DBaaS, you must:
- Set a key as the
client id
of your Kafka client. - Use a human application id to prefix all your topics (the id can be found in the OVH Manager)
-
Download the golang queue example.
-
Start a consumer
./qaas-client-$(uname -s)-amd64 consume --kafka $HOST:9092 --key $KEY --topic $PREFIX.$TOPIC --group ${PREFIX}.queue-example
-
Start a producer and write something to stdin to produce one message (the topic is automatically created).
./qaas-client-$(uname -s)-amd64 produce --kafka $HOST:9092 --key $KEY --topic $PREFIX.$TOPIC # Then write to STDIN to send a message
The OVH Queue DBaaS supports any Kafka standard client.
In the queue examples repository, you can find examples for: