from proton_server import Server
class Application(Server):
def __init__(self, host, address):
super(Application, self).__init__(host, address)
def on_request(self, request, reply_to):
response = request.upper()
self.send(response, reply_to)
print("Request from: %s" % reply_to)
try:
Application("localhost:5672", "examples").run()
except KeyboardInterrupt:
pass
Apache Qpid, Messaging built on AMQP; Copyright © 2015 The Apache Software Foundation; Licensed under the Apache License, Version 2.0; Apache Qpid, Qpid, Qpid Proton, Proton, Apache, the Apache feather logo, and the Apache Qpid project logo are trademarks of The Apache Software Foundation; All other marks mentioned may be trademarks or registered trademarks of their respective owners