How Do You Use Google’s Cloud Pub/Sub with Python?

Problem scenario
You want to use a Data Analytics or a Big Data tool that publishes messages and subscribes to listening to messages being published. You know GCP has a Pub/Sub tool. You know it supports synchronous and asynchronous messaging. How do you use it with Python?

Solution

  1. Log into GCP via the web UI.
  2. Go here: https://console.cloud.google.com/cloudpubsub/
  3. Click “Create Topic”.

How Do You Install RabbitMQ Server on Any Distribution of Linux?

Problem scenario
You want to install RabbitMQ on any distribution of Linux using the same script. How do you write such a script?

Solution

1.a. If you are using SUSE or a Red Hat deriviative of Linux (e.g., CentOS/RHEL/Fedora), go to step #2.

1.b. If you are using Debian or Ubuntu Linux, read the following. There may be manual steps (often three steps with Ubuntu 18.04 in AWS).

How Do You Install Apache ActiveMQ on Any Distribution of Linux?

Problem scenario
You want a Bash script that will install ActiveMQ on CentOS/RedHat/Fedora, Debian/Ubuntu, and SUSE Linux distributions.  How do you write a script that will work on different distributions of Linux to install Apache ActiveMQ?

Solution
With a “sudo bash” command, run a script with the following content (e.g., call the script below “installactivemq.sh” and run “sudo bash installactivemq.sh“):

#!/bin/bash
# Written by www.continualintegration.com

activemqversion=5.15.12 

A List of RabbitMQ Books

Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions by Gregor Hohpe and Bobby Woolf
Instant RabbitMQ Messaging Application Development How-to by Andrew Keig
Learning RabbitMQ by Martin Toshev
Mastering RabbitMQ by Emrah Ayanoglu, Yusuf Aytas and Dotan Nahum
Production-Ready Microservices: Building Standardized Systems Across an Engineering Organization by Susan J. Fowler
RabbitMQ Cookbook by Sigismondo Boschi and Gabriele Santomaggio
RabbitMQ Essentials by David Dossot
RabbitMQ in Action: Distributed Messaging for Everyone by Alvaro Videla