Skip to main content

TCP-eventbus-client-Python

Introduction

This is a TCP eventbus implementation for python clients. The protocol is quite simple. for more information visit !https://github.com/jaymine/TCP-eventbus-client-Python

  • 4bytes int32 message length (big endian encoding)

  • json string

  • built-in keys

  1. type: (String, required) One of “send”, “publish”, “register”, “unregister”.

  2. headers: (Object, optional) Headers with JSON format. Value of string type is supported.

  3. body: (Object, optional) Message content in JSON format.

  4. address: (String, required) Destination address

  5. replyAddress: (String, optional) Address for replying.

example

class Client():

#Handler

def Handler(self,message):
if message != None:

print(message[‘body’][‘result’],’4’);

eb=Eventbus.Eventbus(Client(),’localhost’, 7000)

#jsonObject -body

body={‘msg’:’add 4 to 0’,}

#DeliveryOption

do=DeliveryOption.DeliveryOption(); do.addHeader(‘type’,’text’) do.addHeader(‘size’,’small’) do.addReplyAddress(‘add’) do.setTimeInterval(5)

#register handler

eb.registerHandler(‘add’,Client.Handler);

#send

eb.send(‘add’,body,do)

#close after 5 seconds

eb.closeConnection(5)

samples

Simple example, TimeKeeper

Metadata

Release files for vertx-eventbus 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vertx-eventbus 2.0.0
File Size Uploaded
vertx-eventbus-2.0.0.zip 25.6 kB Details

Release files / vertx-eventbus-2.0.0.zip

Download URL vertx-eventbus-2.0.0.zip
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5b9fa18fff4a4a6a5cc86f7c5066a803599cebc3f794c9e0bdbd7a1374a3c270
BLAKE2b-256 checksum
How to use checksums
4267945c74801023a566fde88df39178fd2cd6441ae3ec124df5ec71139409b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.0 This release

1 release file

1.2.0

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page