Integrate and extend your AirVantage platform
This overview describes what you can do with the AirVantage Cloud Connector via a simple use case: Connecting your system to Google Cloud Pub/Sub and getting raw data from your Google topic.
This topic covers all of the technical aspects needed for a robust, secure, and reliable interface:
- principles & best practices
- configuration & authentication
- how to get messages
This section explains when and why you should use the Cloud connector, what it is and the available options.
The following are key features of the Google Cloud Connector:
When you connect AirVantage to the Google Cloud platform, you have to define which notifications you want to receive:
If the message is not acknowledged by the receiver, AirVantage will try to deliver it again until the message is acknowledged.
This section explains how to configure your client to be robust, reliable, and secure. Please read this section carefully and supply the correct information to enable the endpoint on the AirVantage side.
Ensure you have the following prerequisites
Configuration is performed in two steps:
Perform these two steps to activate this feature with your application:
production@airvantage-pub-sub.iam.gserviceaccount.com
. No password is supplied to Sierra Wireless.Step2: Supply the following information using the CRM
and select Request Support
:
Company Name on AirVantage.
Google Developers Console Project ID which is the project ID automatically generated when you create your project in Google Cloud Platform.
Name of the topic When the ticket is resolved, you will be able to receive messages in your Google Pub/Sub topic. You just need to subscribe to your Google topic.
The type of messages you want to receive:
Not to be confused with the project name, the project ID is a unique identifier for your project.
Install the Cloud SDK and authenticate gcloud with the Google Cloud Platform:
gcloud init
To consume a message, install the Cloud SDK alpha command component:
gcloud components install alpha
Execute the gcloud command in a terminal window, providing the Google Developers Console Project ID and the subscription name. By default, only one message will be read on the topic. But you can set a higher number of messages that Cloud Pub/Sub can return.
gcloud alpha pubsub subscriptions pull --max-messages{max_messages} projects/{project Id}/subscriptions/{MySub}
When you receive a message you have to acknowledge it, if you haven’t chosen the auto-acknowledgement option. If a received message is not acknowledged, AirVantage will try to send it again until your application acknowledges it.
gcloud alpha pubsub subscriptions ack subscription {MySub} {ACKID [ACKID ...]}
If you now receive a message, your setup is complete. If not, check your configuration in the Google console.
This section explains how to consume messages from the Google Cloud platform to support high-volume messaging.
GooglePubSubConnector : This Google Cloud Java application uses the Google API Client Library to connect to the Google Cloud Pub/Sub topic and pull messages.
Use Git to clone it from the repository.
You can use Eclipse to edit the files (as an Eclipse project is supplied), but it is not mandatory.
The source project is organized with three main files:
In the configuration file config.properties, you have to specify:
This application is robust . Upon RPC (remote procedure call) failures, it retries automatically, using an exponential re-try strategy.
The configuration file config.properties has to be adapted.
Enjoy !