ASV Messaging Queue API for message passing between processes.
Project description
# SRM Autonomous Surface Vehicle Messaging Queue API
------
The team SRMASV uses this repository as an API to transfer data from one process or device to another process or device.
------
### Installation
------
To install just type in the following command:
`pip install asvmq`
There are three type of topologies involved:
1. [x] Topic Topology
2. [ ] Work Queue Topology
3. [ ] Merge Topology
## Instructions for Use:
#### Publisher
The `publisher` objects sends data over RabbitMQ broker, acting as the sole messenger to send data over the `asvmq` exchange.
The message has to either be an instance of a protobuf message, or it must be a string to be sent over, otherwise the publisher will generate an error and not send your message altogether.
The syntax of Publisher is asvmq.Publisher(**topic_name**,**object_type**,hostname, port)
Here, the required arguments are bolded.
If the parameter passed to the publish method is a protobuf message, you need not serialise the message, but instead pass the protobuf object to the method itself.
To use the `publisher` object, write the code in the following manner:
```
import asvmq
import asvprotobuf.*_pb2
pub = asvmq.Publisher("hello", asvprotobuf.sensor_pb2.Imu)
while True:
pub.publish("Hello world!!")
```
------
The team SRMASV uses this repository as an API to transfer data from one process or device to another process or device.
------
### Installation
------
To install just type in the following command:
`pip install asvmq`
There are three type of topologies involved:
1. [x] Topic Topology
2. [ ] Work Queue Topology
3. [ ] Merge Topology
## Instructions for Use:
#### Publisher
The `publisher` objects sends data over RabbitMQ broker, acting as the sole messenger to send data over the `asvmq` exchange.
The message has to either be an instance of a protobuf message, or it must be a string to be sent over, otherwise the publisher will generate an error and not send your message altogether.
The syntax of Publisher is asvmq.Publisher(**topic_name**,**object_type**,hostname, port)
Here, the required arguments are bolded.
If the parameter passed to the publish method is a protobuf message, you need not serialise the message, but instead pass the protobuf object to the method itself.
To use the `publisher` object, write the code in the following manner:
```
import asvmq
import asvprotobuf.*_pb2
pub = asvmq.Publisher("hello", asvprotobuf.sensor_pb2.Imu)
while True:
pub.publish("Hello world!!")
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
asvmq-0.1.6.tar.gz
(5.2 kB
view hashes)
Built Distributions
asvmq-0.1.6-py3.7.egg
(13.5 kB
view hashes)
asvmq-0.1.6-py3-none-any.whl
(6.6 kB
view hashes)