Support Center
Security → HTTP Basic Auth
in Zato Dashboard and fill out the form as in the example below:/customer/*
and /address/*/new
, it will be able to publish to topics /customer/updated and /address/texas/new but not to /invoices/new or /accounts/virginia because the latter two do not match the assigned patternsself.pubsub.publish
at any point in your Python code.def handle(self):
# Topic to publish to
topic_name = '/my/topic'
# Data to publish
data = {'client_id': 123, 'invoice_id': 456}
# Publish the message now
self.pubsub.publish(topic_name, data=data)
$ curl -XPOST http://user:pass@localhost:17010/zato/pubsub/topic//crm/customer/new \
-d '{"data":{"customer_name":"Jane Doe"}, "priority":7}'
{"msg_id": "zpsm1a150dbfb8ab3cb676a471b5"}
$
Introducing the security mechanisms that all pub/sub endpoints use
How arbitrary REST-based applications can participate in publish/subscribe scenarios
Understanding publication and subscription patterns that permit endpoints to publish and receive messages
How to publish and receive messages using Python code