Exemplo n.º 1
0
    def send(self, msg):
        """Sends xMsgMessage object to a Clara component

        Args:
            msg (xMsgMessage): xMsg transient message object
        """
        proxy_address = ProxyAddress(ClaraUtils.get_dpe_host(msg.topic),
                                     ClaraUtils.get_dpe_port(msg.topic))
        conn = self.get_connection(proxy_address)
        self.publish(conn, msg)
Exemplo n.º 2
0
    def sync_send(self, msg, timeout):
        """Sends xMsgMessage object to an xMsg actor synchronously

        Args:
            msg (xMsgMessage): xMsg transient message object
            timeout (int): response message timeout in seconds
        """
        proxy_address = ProxyAddress(ClaraUtils.get_dpe_host(msg.topic),
                                     ClaraUtils.get_dpe_port(msg.topic))
        conn = self.get_connection(proxy_address)
        self.sync_publish(conn, msg, timeout)