diff --git a/msgflo/msgflo.py b/msgflo/msgflo.py index 9c69416..cceb9ec 100755 --- a/msgflo/msgflo.py +++ b/msgflo/msgflo.py @@ -297,7 +297,10 @@ def _on_subscribe(self, client, userdata, mid, granted_qos): def _on_message(self, client, userdata, mqtt_msg): logging.debug('got message on %s' % mqtt_msg.topic) - port = "" # FIXME: map from topic back to port + port = "" + for inport in self.participant.definition['inports']: + if inport['queue'] == mqtt_msg.topic: + port = inport['id'] def notify(): msg = Message(mqtt_msg.payload)