import arg1_topics #***** actual application ********** print 'Using "arg1" messaging protocol of pubsub v3' try: print '------- init ----------' pub.importTopicTree( arg1_topics ) pub.setTopicUnspecifiedFatal() import arg1_listeners import arg1_senders as senders senders.init() print '-----------------------' senders.doSomething1() senders.doSomething2() print '------- done ----------' print 'Exporting topic tree to', arg1_topics.__name__ pub.exportTopicTree('arg1_topics_out') except Exception, exc: import traceback traceback.print_exc() print pub.exportTopicTree() print '------ exiting --------'
import kwargs_topics #***** actual application ********** print 'Using "kwargs" messaging protocol of pubsub v3' try: print '------- init ----------' pub.importTopicTree( kwargs_topics ) pub.setTopicUnspecifiedFatal() import kwargs_listeners import kwargs_senders as senders senders.init() print '-----------------------' senders.doSomething1() senders.doSomething2() print '------- done ----------' print 'Exporting topic tree to', kwargs_topics.__name__ pub.exportTopicTree('kwargs_topics_out') except Exception, exc: import traceback traceback.print_exc() print pub.exportTopicTree() print '------ exiting --------'
import arg1_topics #***** actual application ********** print 'Using "arg1" messaging protocol of pubsub v3' try: print '------- init ----------' pub.importTopicTree(arg1_topics) pub.setTopicUnspecifiedFatal() import arg1_listeners import arg1_senders as senders senders.init() print '-----------------------' senders.doSomething1() senders.doSomething2() print '------- done ----------' print 'Exporting topic tree to', arg1_topics.__name__ pub.exportTopicTree('arg1_topics_out') except Exception, exc: import traceback traceback.print_exc() print pub.exportTopicTree() print '------ exiting --------'
import kwargs_topics #***** actual application ********** print 'Using "kwargs" messaging protocol of pubsub v3' try: print '------- init ----------' pub.importTopicTree(kwargs_topics) pub.setTopicUnspecifiedFatal() import kwargs_listeners import kwargs_senders as senders senders.init() print '-----------------------' senders.doSomething1() senders.doSomething2() print '------- done ----------' print 'Exporting topic tree to', kwargs_topics.__name__ pub.exportTopicTree('kwargs_topics_out') except Exception, exc: import traceback traceback.print_exc() print pub.exportTopicTree() print '------ exiting --------'