How to do it...

Once you have installed the SNAS BMP message API and started ZooKeeper server and Kafka server as shown previously, you are ready to run a simple listener for the BMP messages.

First, start the Python client of the SNAS message API:

$ python
Connecting to kafka... takes a minute to load offsets and topics, please wait
Now consuming/waiting for messages... is adopted from openbmp-python-api-message/examples/

Now, if you run the following from another Terminal and send an empty message using the Enter key in your keyboard:

$ kafka_2.11- --broker-list localhost:9092 --topic openbmp.parsed.router

You will receive the following ...

Get Python Network Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.