Skip to content

Quickstart

Ben Kroop edited this page Feb 26, 2019 · 1 revision

Prerequisites

Starting the Software

  1. Open two terminals and in each terminal, cd into the root directory of the hover-jet git repository.
  2. In the each terminal, start a hoverjet container by running jet run
  3. In the first terminal, run /jet/run/subscriber_demo_bq_main. You should briefly see some output at the start.
  4. In the second terminal, run /jet/run/publisher_demo_bq_main.
  5. You should now see messages printing periodically in the first terminal.

Explanation

  • The PublisherDemoBQ connects to the pub/sub Broker and periodically publishes a message on the channel named demo_channel_name. The source for the PublisherDemoBQ is here: infrastructure/comms/tests/pub_sub_demo_bqs/publisher_demo_bq.cc
  • The SubscriberDemoBQ connects to the pub/sub Broker and subscribes to messages on the channel named demo_channel_name. It periodically reads from this channel and prints the contents of the message received. The source for SubscriberDemoBQ is here: infrastructure/comms/tests/pub_sub_demo_bqs/subscriber_demo_bq.cc
  • The message message sent between the two BQs is the DemoMessage, whose schema is defined here: infrastructure/comms/schemas/demo_message.hh. This message contains just a string value and a message header, which it inherits from the base Message class.