django - message publishing using kombu - TypeError 'str' object is not callable -
after encoding message payload json, i'm attempting publish broker with:
connection = establish_connection() producer = producer(channel=connection, exchange="inbound", routing_key="apisubmit") producer.publish(body=pl,headers={"api_access_key": "xxxx", "client_id": 4, "object_type": "location", "action": "c"})
django returning following:
traceback: file "/usr/local/pythonenv/openblock/lib/python2.6/site-packages/django-1.3.1-py2.6.egg/django/core/handlers/base.py" in get_response 111. response = callback(request, *callback_args, **callback_kwargs) file "/usr/local/pythonenv/openblock/src/myblock/myblock/barz/views.py" in testtwo 19. msg=publish_kombu() file "/usr/local/pythonenv/openblock/src/myblock/myblock/barz/messaging.py" in publish_kombu 99. routing_key="apisubmit") file "/usr/local/lib/python2.6/dist-packages/kombu/messaging.py" in __init__ 82. self.exchange = self.exchange(self.channel) exception type: typeerror @ /barz/publish_kombu/ exception value: 'str' object not callable
producer.exchange
must exchange
. default it's exchange("")
, somehow must have set string.
Comments
Post a Comment