PubSub+

In this tutorial, you will learn how to

  1. Configure your Solace PubSub+ Broker
  2. Setup your Boomi AtomSphere
  3. Design a basic event-driven architecture in Solace PubSub+ Event Portal
  4. Configure the Solace connector in the Boomi AtomSphere
  5. Send/Receive messages between Boomi and Solace

Prerequisite

This tutorial assumes:

Access to a Solace messaging service, Solace PubSub+, can be achieved in either one of the three flavours

  1. Hardware Appliance
  2. Software broker image (Docker, Virtual image)
  3. Solace Cloud service instance

This tutorial will walk you through setting up a Solace Cloud service instance, which also gives you access to the Event Portal. If you are interested in setting up a local broker running on Docker or a virtual machine check out the PubSub+ Event Broker: Software documentation

Sign up for free Solace Cloud account

Navigate to the Create a New Account page and fill out the required information. No credit card required!

Create a messaging service

After you create your Solace Cloud account and sign in to the Solace Cloud Console, you'll be routed to the event mesh page.

Solace Cloud Event Mesh Page

Click on β€˜Cluster Manager' and all the messaging services associated with your account will show up if you have any already created. To create a new service, click either button as depicted in the image below:

Solace Cloud Landing Page

Fill out all the details for your messaging service, and then click "Create" at the bottom of the page.

Create Solace Cloud Messaging Service

Your service should be ready to use in a couple seconds! πŸŒͺ

Core concepts

Boomi builds, deploys and manages all the processes in a concept called Atoms, which is a lightweight Java application that is deployed on a host with Internet access. Think of it as your single-tenant, single-node runtime engine. There are two deployment models for Atoms:

  1. In-the-cloud deployment (using Boomi Atom Cloud)
  2. On-premise deployment (using local Atom setup)

Atom gif

4 Steps to get started with Boomi

1. Create a Boomi trial account

if you dont have an account, navigate to https://boomi.com/form/trial/ and sign up for a free account.

After you sign up for a Boomi platform account and login, you will have access to the Boomi AtomSphere - your one stop shop for all your integrations πŸ€“

AtomSphere

You will see the menu at the top

menu

2. Configure and deploy your local Atom

In this tutorial, we will be setting up a local Atom.

You can either navigate to the links below for more information or follow the steps after

  1. Windows Machine.
  2. Linux.
  3. MacOS Using Docker

πŸ‘‰ Navigate to the Manage tab and click on Atom Management

manage

πŸ‘‰ Click on +New and choose Atom

new-atom

πŸ‘‰ Choose the operating system of choice in the Atom Setup box

atom-setup

πŸ“ Notes on Docker installation

The installer is a shell script that you run locally and automatically configure your docker setup

  1. ./atomdocker_install64.sh -h for more information on how to run it
  2. You can generate a token by clicking on Generate Token under Security Options
  3. Create a /var/boomi directory because the script assumes it already exists and make sure its owned by the current user
    1. Navigate to /var/boomi/ after you create it
    2. Execute the following from terminal chown $USER .
    3. Make sure this directory is shared on docker. This is done by opening the docker preferences and adding it under File Sharing Resources tab

docker-menudocker-sharing

πŸƒβ€β™‚οΈ Run the atom

Execute the atom docker installation shell script as follows
./atomdocker_install64.sh -n <name_of_atom> -k <insert_token>

At this point, you can confirm that the Atom has been created and linked to your AtomSphere when you navigate to the Atom Management in the Manage tab and you will see your newly created atom under the Unattached Atoms section

unattached-atom

3. Setup Boomi environment

Boomi Environments are synonymous to workspaces thats used for testing or production purposes. You need an environment to "attach" the atom to. You can read more about Boomi Environments on the Environment Management Boomi User Guide

Under the Manage menu, navigate to the Atom management and add a new environment env-menu

Give it a name and choose Test for the environment classification env-setup

4. Attach the Atom to the environment

Select your newly created environment and search for your atom to attach it env-wiz

πŸŽ‰ Voila! Now you have your Solace and Boomi environments setup

Your free trial of Solace PubSub+ Cloud comes with the Event Portal, which helps you visualize the structure of event-driven architectures. The trial also includes a sample architecture called Acme Rideshare, that we'll use for this lab.

Menu

ridesharedomain

For our purposes:

Passenger App: will mock an event publisher
Ride Requested: is an event with a JSON schema payload representing a ride request
Driver Management: will be a simple Boomi flow, which will pick up the ride request and write it to the process log. Very simple πŸ€™

event_details

Two things to note here:

Now back to the Boomi AtomSphere!

1. Create a new Boomi component

πŸ‘‰ Click on the New button to create a new component

AtomSphere2

πŸ‘‰ Make sure the Type is Process. Give it a name and folder to be saved in

component

canvas

2. Search for the Solace shape from the list of connectors

solace-shape

πŸ‘‰ Drag and drop it into the canvas

πŸ‘‰ Configure the Start shape to be a Solace PubSub+ Connector with the a Listen action as seen in the screenshot below

connector-config

3. Configure Connection

πŸ‘‰ In the Connection section, click on the + icon to configure the connection parameters

connector-connection

πŸ‘‰ Fill in the connection parameters with the Host, Message VPN Name, Client Username and Password. This is obtained by navigating back to the Solace PubSub+ Cloud Manager console, clicking on the previously created service and navigating to the Connect tab. Note that you will have to expand the "Solace Messaging" menu to get the connection details connection-service

πŸ‘‰ One more piece of information you'll need is an Event Portal token (this lets you import in the topic string and schema from the previously designed architecture). In Solace Cloud console, scroll all the way to the bottom of the left column, and click on the account management icon, then select Token Management.

cloud_account

πŸ‘‰ Click on the "Create Token" button in the upper right.

πŸ‘‰ Name the token "Boomi UI access"

create-token

πŸ‘‰ Scroll all the way to the bottom of the page and enable the Event Portal Read permission.

eventportalperm

πŸ‘‰ Click on Generate Token

πŸ‘‰ Copy the generated token (make sure to grab it all), and paste it into the Event Portal API Token field in Boomi.

πŸ‘‰ Test the connection, by clicking on the Test Connection button. Note: Choose your Atom here

testconnection

success-connection

4. Configure Operation

Back to the Solace Shape configuration, click on the + icon for the Operation section to configure the operation parameters as seen in the screenshot below

πŸ‘‰ Assign the Mode to Persistent Transacted
πŸ‘‰ Select the Create Queue and Topic Subscription option

connectoroperation

πŸ‘‰ Click on the Import Button in the Upper Right. Select your atom and the Solace connection that you just created, then click on Next.

Boomi grabs the events available to you from the Event Portal, and lists them in a drop down box eventlist

πŸ‘‰ Pick the RideRequested event, click Next, then Finish.

Now check out our Connector Operation: The data format from the Event Portal is now a Boomi Profile (click on the pencil to see more) and the topic string is filled in for us. operationupdated

πŸ‘‰ Now your Canvas should look like this with the newly added shape

canvas1

5. Add a Notify shape

In order to test out the end to end connection and make sure that the events sent from the Solace PubSub+ broker are being received by the Solace Boomi Connector, we want to add a way to log the events received. To do so, lets go ahead and add a Notify shape

πŸ‘‰ Search for and drag the notify shape into the canvas from the "Search Shapes" section

notify-search

πŸ‘‰ Configure the Notify shape to log the payload received from the message sent

notify-config

Note that {1} in the Boomi context means variables. Click on the + icon to add a new variable and choose the type to be Current Data

notify-vars

6. Connect the Solace PubSub+ Listener to the Notify Shape

boomi-connect

stop

To connect everything together, we will need to package the newly created process flow and deploy it on the locally running Atom

arch

Package and Deploy the Process

πŸ‘‰ Click on the Create Package button

package

πŸ‘‰ The newly created component will be automatically selected by default

πŸ‘‰ Click Next to add details. No need to add any more details

πŸ‘‰ Click create package and you will see this notification

package-success

Deploy the packaged process on the running atom

πŸ‘‰ Click on the Deploy button and choose the Environment that you created previously

πŸ‘‰ Click Next until you get to the Review Deploy step

πŸ‘‰ Click on the Deploy button!

deploy-success

Publish events πŸ’₯!

πŸ‘‰ Navigate back to your Solace Cloud console, select the messaging service and navigate to the Try Me! tab

tryme

πŸ‘‰ In the Publisher section, click on the Connect button, change the topic to be taxi/nyc/v1/dropoff/rideX (since we have our queue subscribing to this topic, remember!) and update the message body to whatever you want

publisher-connect

πŸ‘‰ Smash that Publish button.

Check out the logs

πŸ‘‰ From the Boomi AtomSphere, navigate to the Process Reporting section under the Manage tab

process-reporting

You will see the process reporting menu with your newly created NewProcess process. Note that you can click on the refresh icon reporting-menu

πŸ‘‰ Click on the view process logs icon

logslogs2logs3

You're done!

βœ… Sign up for a Solace PubSub+ Cloud account and configure a messaging service broker with a queue
βœ… Sign up for a Boomi AtomSphere account and setup a Solace Pubsub+ Connector for a listen configuration and bind to a message queue
βœ… Send events to the same topic the queue is subscribed to
βœ… Check out more information on the Solace Connector in the PubSub+ Connector Hub page

Thanks for participating in this codelab! Let us know what you thought in the Solace Community Forum!