Skip to content

Instantly share code, notes, and snippets.

@dsuch
Created November 19, 2014 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsuch/599a140307d285f13d64 to your computer and use it in GitHub Desktop.
Save dsuch/599a140307d285f13d64 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from zato.common.broker_message import SERVICE
from zato.common.util import new_cid
from zato.server.service import Service
class MyPub(Service):
def handle(self):
msg = {
'action': SERVICE.PUBLISH.value,
'service': 'zato.helpers.input-logger',
'payload': '{"hello":"how are you?"}',
'cid': new_cid(),
}
self.broker_client.invoke_async(msg)
@kenxinlee
Copy link

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment