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.
{
"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
Release files for pulsar-producer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pulsar_producer-0.1.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pulsar_producer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.3 kB
Release files / pulsar_producer-0.1.0.tar.gz
| Download URL | pulsar_producer-0.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c99c920134e4ab840094327407a18268df328bf020ee809d5be78e55d7fdf3e5
|
|
BLAKE2b-256 checksum How to use checksums |
cc20d01721178faf01b1eb204da48c38c084fa55ffd882e55f07b802cc84a476
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.8.6 Linux/6.0.10-arch2-1
|
Release files / pulsar_producer-0.1.0-py3-none-any.whl
| Download URL | pulsar_producer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5abf9d0be1793ac8e6185dc50363e81a2b290b36885a9fd50b12f11d56619060
|
|
BLAKE2b-256 checksum How to use checksums |
7a135f58b9c30894ed27c147c0f6006e1bd21d735e6ff91700eccde4995a5ad9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.8.6 Linux/6.0.10-arch2-1
|