Skip to main content

CLI that help developers to publish messages into any pulsar topic in order to test features (usually, consumers) that relies on a pulsar consumer

Project description

Pulsar Producer

CLI that allows to send a message into a Apache Pulsar topic

Usually, implementing an Apache Pulsar Consumers, you will need to test it before release. Then, it's quite painful that you need to write or change some code in order to test it. Having that said, I have implemented this CLI that can help you with that.

Now, you can have a file with the message you want to send into a specific Apache Pulsar Topic and simply test your Apache Pulsar Consumer easily.

How to use it

First, you should install the CLI on your machine

pip install pulsar-producer or pip install --user pulsar-producer if you want make it available only for your user.

NOTE: This package still not publish on pypi, only on testing environment

NOTE: pip install -i https://test.pypi.org/simple/ pulsar-producer==0.1.0

Then, you need to have an file with your Apache Pulsar server address. This file SHOULD follow a JSON format.

Example:

my-apache-pulsar-configuration.json

{
        "host": "localhost",
        "port": "6650",
        "topic": "my-topic-name"
}

Then, you need to have another file with contains the message you want to publish in your Apache Pulsar topic in order to test your Apache Pulsar Consumer. This file can contains ANYTHING you want. In this example, let's say you want to publish a JSON structure message.

my-message-file-example.json

{
    "KEY": "THIS IS MY MESSAGE WHICH COULD BE ONLY PURE TEXT (NOT JSON)"
}

Now, you just need to run:

pulsar-producer --pulsar-connection-file ./path-of-your-my-apache-pulsar-configuration-example-json --message-file ./path-or-your-message-file

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulsar_producer-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulsar_producer-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file pulsar_producer-0.1.0.tar.gz.

File metadata

  • Download URL: pulsar_producer-0.1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.6 Linux/6.0.10-arch2-1

File hashes

Hashes for pulsar_producer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c99c920134e4ab840094327407a18268df328bf020ee809d5be78e55d7fdf3e5
MD5 194fa01545b77ac31b0bcd9610870439
BLAKE2b-256 cc20d01721178faf01b1eb204da48c38c084fa55ffd882e55f07b802cc84a476

See more details on using hashes here.

File details

Details for the file pulsar_producer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pulsar_producer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.6 Linux/6.0.10-arch2-1

File hashes

Hashes for pulsar_producer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5abf9d0be1793ac8e6185dc50363e81a2b290b36885a9fd50b12f11d56619060
MD5 c5db3a3b8b8862d5bc66e4a57f1f2d3d
BLAKE2b-256 7a135f58b9c30894ed27c147c0f6006e1bd21d735e6ff91700eccde4995a5ad9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page