In this Post
This article will explain how to use PubSub+’s topic builder under publisher to visualize and build smart topics that are hierarchical and intuitive. The topic builder helps you understand how topic levels play their part during topic building. A well structured intuitive topic is essential for successfully wildcarding topics during subscriptions.
Prerequisite: Set Up a PubSub+ Event Broker
Prerequisites
- Before you start, you should read this introduction to smart topics.
- You will also will need access to a PubSub+ Event Broker and PubSub+ Manager. If you do not, follow the instructions below.
Steps to Build a Smart Topic and Publish/Subscribe Events
This section assumes that you have completed the prerequisites, have access to Pubsub+ Manager, and have established a connection with publisher and subscriber.
Example Use Case: An airline wants to modernize and event-enable their operations and want to track their flights.
-
- Build the topic in the topic builder in Noun/Verb/Properties format|
E.g. –flight/boarding/fl1234/yow/ewr
is pre-populated. Change the topic for a different flight number (such asflight/boarding/fl777/yow/ewr
)
and hit the generate topic button - Click on one of the suggestions:
flight/boarding/*/yow/>
under subscriber section on right. This is called wildcarding. By using * you are indicating that the subscriber application does not care about the flight number and>
indicates that the subscriber gets all the events from originyow
regardless of its destination and any additional property after yow. Therefore, by subscribing to this wildcarded topic , the subscriber application will receive all events for the flights that are boarding and coming fromyow
.
- Subscribe to the topic
- Publish the pre-populated sample message.
Voila! you just published your first event.
- Build the topic in the topic builder in Noun/Verb/Properties format|
On successfully publishing an event, you should be able to see the json event received by your subscriber.
Prerequisite: Set Up a PubSub+ Event Broker
- Follow these instructions to install a software broker and connect on PubSub+ Manager at port 8080.
- Click on the default message vpn and navigate to try-me from the left panel.
- Click the connect button in try-me under publisher and subscriber. Ensure that the connection is successful
– OR –
- Follow these instructions to set up a cloud service.
- Click on the service created and navigate to top right to “Open Pubsub+ Manager” from cloud console.
- Click on try-me from the left panel.
- Perform the additional steps below to establish a connection for cloud services try-me
- Copy/paste solace-cloud-client’s username and password in Pubusb+ Manager’s Establish Publisher Connection section
- Copy/paste solace-cloud-client’s username and password in Pubusb+ Manager’s Establish Publisher Connection section