Register Now for EDA Summit 2024 - Virtual Event Register for Free
Search
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.

    Prerequisites

    1. Before you start, you should read this introduction to smart topics.
    2. 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.

      1. 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 as flight/boarding/fl777/yow/ewr)
        and hit the generate topic button
      2. 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 origin yow 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 from yow.
      3. Subscribe to the topic
      4. Publish the pre-populated sample message.
        Voila! you just published your first event.

    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

    1. Follow these instructions to install a software broker and connect on PubSub+ Manager at port 8080.
    2. Click on the default message vpn and navigate to try-me from the left panel.
    3. Click the connect button in try-me under publisher and subscriber. Ensure that the connection is successful

    – OR –

    1. Follow these instructions to set up a cloud service.
    2. Click on the service created and navigate to top right to “Open Pubsub+ Manager” from cloud console.
    3. Click on try-me from the left panel.
    4. Perform the additional steps below to establish a connection for cloud services try-me
      1. Copy/paste solace-cloud-client’s username and password in Pubusb+ Manager’s Establish Publisher Connection section