Retrieve message properties from Azure Service bus topics withn Python -


must acquire the property message me to use Python 2.7. I know that there are 3 properties in the message: CDID, Active and Alarm:

I send messages to this client in C #;

  String Connection String = cloud configuration Mandkknetseting ( "Microsoft.ServiceBus.ConnectionString"); Subject Client Nucleus = TopicContact.CredFramConnected String (Connection String, "CDMsGues"); Var serviceMsg = New Brocade Message ("Alarm Dynamic"); ServiceMsg.Properties ["cdId"] = Message. Properties ["CDID"]; ServiceMsg.Properties ["active"] = Incorrect; ServiceMsg.Properties ["Alarm"] = Wrong; NewClient.Send (serviceMsg); How to get  

properties I've created a subscription and I am able to receive messages using Python but I do not have any indication that message.

  KEY_NAME = '******' key_value = '******' service_namespace1 = '******' SBS = ServiceBusService (service_namespace = service_namespace1, shared_access_key_name = KEY_NAME, Shared_access_key_value = Key_value) active = "active" deactivate = "deactivate" sbs.create_subscription ( 'cdmessages', 'is AllMessages'), while it is true: msg = sbs.receive_subscription_message ( 'cdmessages', 'AllMessages', peek_lock = false) Print (msg.body) MessageString = str (msg .body) If MessageString.find (active) == true newState = "active" return (newState)  
because I send "alarm Inactive "

I can get the" Active "portion working or in the form of message text "Alarm active" but it just made me partly partly to work. I should be able to read the properties I have tried msg.properties but it returns with an error that the attribute property does not exist.


Comments

Popular posts from this blog

Active Directory Authenticated Proxy Server with Squid or CNTLM -

java - @PluginTarget(Node.class) not registering as neo4j plugin -

python - Calculate STD manually using Groupby Pandas DataFrame -