Hi,
I’m trying to consume amqp messages by following the Example in nameko.messaging module,but failed.
@consume(queue = queue)
def handle_message(self, message):
I found that the messages are received,and handle_message is spawned in spawn_managed_thread(nameko/containers.py),but isn’t executed for some reason,which I tried very hard but failed to figure out.
The following is what I get by adding “print(fn)” in spawn_managed_thread method:
functools.partial(<bound method Consumer.handle_message of <Consumer [LibvirtCIKojiWatcherService.handle_message] at 0x7fa6ec8f6b50>>, {‘mlist’: {‘list_name’: ‘package-announce’}, ‘msg’: {‘archived-at’: ‘https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/J5IAOAVQXTSTN67OMO3L4HSZB4RQP27Y/’, ‘cc’: None, ‘delivered-to’: None, ‘from’: ‘updates@fedoraproject.org’, ‘in-reply-to’: None, ‘message-id’: ‘20201230013913.4130330A5C71@bastion01.iad2.fedoraproject.org’, ‘references’: None, ‘subject’: ‘Fedora 33 Update: golang-github-pborman-uuid-1.2.1-1.fc33’, ‘to’: ‘package-announce@lists.fedoraproject.org’, ‘user-agent’: None, ‘x-mailman-rule-hits’: ‘nonmember-moderation’, ‘x-mailman-rule-misses’: ‘dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3’, ‘x-message-id-hash’: ‘J5IAOAVQXTSTN67OMO3L4HSZB4RQP27Y’}}, <Message object at 0x7fa6ec88f9d0 with details {‘state’: ‘RECEIVED’, ‘content_type’: ‘application/json’, ‘delivery_tag’: 2, ‘body_length’: 828, ‘properties’: {}, ‘delivery_info’: {‘exchange’: ‘zmq.topic’, ‘routing_key’: ‘org.fedoraproject.prod.mailman.receive’}}>)