API Publish/Subscribe Between Zato Services

One of the additions in the upcoming Zato 3.2 release is an extension to its publish/subscribe mechanism that lets services publish messages directly to other services. Let’s check how to use it and how it compares to other means of invoking one’s API services. 

How Does It Work?

In your Zato service, you can publish a message to any other services as below. Simply point self.pubsub.publish to the target service by the latter’s name and it will receive your message.