문제

def callback(ch, method, properties, body):
        prop = properties
        print prop
        #print prop[1]
        #print prop[“headers”]
        #print prop.headers()
        print body

This is the list from prop:

<BasicProperties(['delivery_mode=2', "headers={'BIProto.ClickEvent': 'BIProto.ClickEvent'}", 'content_type=application/x-protobuf'])>

I'm able to print body and the list of basic properties. But how can I just get headers?

All the #print statements in the function error-ed.

도움이 되었습니까?

해결책

Nevermind, all I had to do was print prop.headers

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top