How to send data to the Google Cloud Pub/Sub

In this tutorial you will learn how to send data to the Google Cloud Pub/Sub

Benefits of the Google Cloud Pub/Sub output connector:

  • Directly stream device data from akenza to Google Cloud Pub/Sub and subsequently process it in Google Cloud Pub/Sub

  • Easily process low-power device data e.g. LoRaWAN device data in Google Cloud Pub/Sub

In this tutorial, you will learn, how to send data to Google Cloud Pub/Sub. The following steps are explained in more detail:

1. Setup a Google Cloud Pub/Sub

First, you will need to set up a project on the Google Cloud Console.

1.1 If you are new to Google Cloud, create an account to evaluate how the products perform in real-world scenarios.

1.2 Set up a Cloud Console project in a PubSub section Create or select a project and enable the Pub/Sub API for that project. You can view and manage these resources at any time in the Cloud Console.

1.3 Set up a topic where your data shall be sent to. Go to the Pub/Sub topics page in the Cloud Console. Go to the Pub/Sub topics page and select Create a topic.

In the Topic ID field, provide a unique topic name, for example, MyTopic and select Save.

2. Add an akenza service account

Navigate to your Project settings and select on IAM policy section. Select + Add and paste the akenza publisher service account key. Give the role of a Pub/Sub Publisher.

3. Setup a Data Flow in akenza

Create a new Data Flow in akenza with Google Cloud Pub/Sub as output connector. Define a Connector Name and insert the topic id obtained from the project. Optionally use a custom payload.

Create a new device using the Data Flow and start sending data.

4. Setup a Subscription

In your Pub/Sub section go to Subscriptions, select Create Subscription, give it a name, and select the previously created topic.

Following steps to view device data:

  • Click on the created topic

  • Scroll down to the bottom of the topic details

  • There are three tabs, select Messages

  • Open the dropdown on the bottom "Select a Cloud Pub/Sub Subscription to pull messages from *" and select the subscription previously created

  • Click Pull to fetch the messages which can then be filtered in Filter options and sorted by various p

Last updated