Skip to content

LAB1_GettingStarted

Cedrick Lunven edited this page Feb 3, 2021 · 17 revisions

πŸŽ“ LAB1 - Getting started with Apache Pulsarβ„’


As described in the official website, Apache Pulsarβ„’ is a cloud-native, distributed messaging and streaming platform originally created at Yahoo! and now a top-level Apache Software Foundation project. To know more about the project you can browse the reference documentation.

During this first lab you will install Apache Pulsar from the tarball, create some infrastructure components, then a topic to store messages, then you will read and write messages from it. You don't have to install anything because we leverage Katacoda, a platform providing interactive learning and training for Software Engineers.

ℹ️ Before Starting
---------------------

- 🚨 WARNING : Katacoda may not work on Brave browsers due to cookies being blocked.
You can either use another browser like Chrome of Firefox or disable your ad-blockers.

- πŸ‘ Let us know when you are done
Please give us a πŸ‘ in the youtube chat when you are done.

βœ… Open Scenario

  • Open the pulsar scenarios web page in a new tab of your browser (right-click or ctrl-click on Mac when opening the link) https://www.katacoda.com/datastax/training/pulsar-04

  • Select the first scenario. Getting Started with Apache Pulsarβ„’ by clicking on Start Scenario button.

ℹ️ Information:
You may see less scenarios than the following screenshot in your UI. The reason is we have provided dedicated infrastructure for this live workshop on dedicated scenarios.

βœ… Start Scenario

The scenario starts with a short overview and an estimate of the time needed here 15 minutes. Click on the orange button Start Scenario at the bottom of the instructions.

Click START SCENARIO as shown with the arrow above

βœ… STEP 1: Install Pulsar

Welcome to the first step of the Katacoda scenario Install Pulsar. You don't need to copy the commands. Click a command area on the left panel and it will be pasted in the terminal on the right panel (Magic !).

After executing each command and read related instructions you can navigate to the next phase by clicking CONTINUE.

Execute commands with a simple click

βœ… STEP 2: Configure Pulsar

This screen will help you Configure Pulsar to fit the limitations of the Katacoda environment.

Execute commands as shown above

βœ… STEP 3: Run Pulsar

In this Run Pulsar screen it is now time to start Pulsar. Please wait for Pulsar to fully start before clicking continue. You are allowed to make fun of people that do not read instructions in the youtube chat 🀭

Execute commands as shown above

βœ… STEP 4: Browse the Cluster

Here you will use the pulsar-admin tool. Note that You will get some warning Warning: Nashorn engine is planned to be removed from a future JDK release, this is expected and not harmful. Nashorn is a javascript engine that have been introduced in JDK9 but will be deprecated. It is too hard to maintain as the ECMA script specifications move fast and GraalVM'JS implementation is fast enough. source

Execute commands as shown above

βœ… STEP 5: Create a topic

Execute commands as shown above

βœ… STEP 6: Create a Consumer

Execute commands as shown above

βœ… STEP 7: Create a Producer

Execute commands as shown above

βœ… STEP 8: Send and received more messages

Execute commands as shown above

βœ… End the Scenario

End scenario with NEXT SCENARIO

πŸš€πŸš€ Great ! πŸš€πŸš€ This is it for this first lab and the use of Katacoda for today. You have seen multiple scenarios here if you have still time you can go on or come back later to experiment more patterns with Pulsar. In todays labs we will still use Pulsar but demonstrating other tools.

πŸ‘‰ Let's now move to the next lab 2️⃣