Hi all,<br><br>I&#39;m trying to build an app using MultiService. I need to have 2 services, one that listens for UDP datagrams and another that can send those datagrams to an ActiveMQ server via a Stomp client.<br><br>I can set up the two services just fine, but I&#39;m stuck with how to call the MQ service send method from the UDPServer instance.
<br><br>Some code to illustrate:<br><br><br><br>class GetUDP(DatagramProtocol):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; def datagramReceived(self, datagram, address):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print datagram,address<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Send datagram to the queue server
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # I don&#39;t know how to access the send method for the Stomp client service!<br><br><br><br>testq = internet.TCPClient(APPVARIABLES[&#39;queue_server&#39;], int(APPVARIABLES[&#39;queue_port&#39;]), connections.StompClientFactory
(username=&#39;&#39;,password=&#39;&#39;,queue=&#39;/queue/test&#39;))<br>testq.setName(&#39;Testq&#39;)<br>testq.setServiceParent(MQService)<br><br><br>#create a UDP listener<br>#TODO: this should be driven by the config file
<br>#reactor.listenUDP(42000, GetUDP()) <br>internet.UDPServer(42000,GetUDP()).setServiceParent(MQService)<br># Create an application as normal<br>application = service.Application(&quot;MQExample&quot;)<br><br># Connect our MultiService to the application, just like a normal service.
<br>MQService.setServiceParent(application)<br><br><br>Note: this is won&#39;t run exactly as is, but should give an idea of my problem. I&#39;ve setup the ActiveMQ Stomp client as &#39;testq&#39;. I&#39;ve setup the UDPServer service to listen for UDP packets. I can get the UDP packets and print them, but I can&#39;t figure out how to hand them to my Stomp client&#39;s send() method. This is possible, right?
<br><br>Thanks,<br><br>Don<br>