<div dir="ltr">Hi Simon,<br><br>Thanks for your reply, let me said that when I sent messages using UDP, <br>these messages are bounded to the queue in the channel with this line of code:<br> <i>channel.queueBind(q1, xnameRaw, "#");</i><br>
<br>When I'm using Wireshark, I can view these messages arriving to the broker but they didn't reach to the exchange.<br><br>Why I'm using UDP instead of TCP is because I'm tried with AMQP to work with sensors and servers, <br>
where sensors enqueue messages using UDP due to the typical sensor data is redundant an some loss can be tolerated<br>and the servers receive these messages using a channel protocol over TCP, The servers might use TCP to transport messages reliably.<br>
<br>Thanks again.<br><br><br>PD. Here I put some important lines of the code that I'm using actually to do this task.<br><br>-------------------------------------------------------------------------<br><font><i> String xnameRaw = "UDP raw exchage for testing";<br>
String xtype = "x-udp";<br><br> ConnectionFactory factory = new ConnectionFactory();<br><br> Connection connection = factory.newConnection();<br> Channel channel = connection.createChannel();<br>
<br> factory.setHost(BROKERMQ);<br> factory.setUsername("guest");<br> factory.setPassword("guest");<br> factory.setPort(PORT);<br> <br> Map<String, Object> declArgs = new HashMap<String, Object>();<br>
<br> declArgs.put("ip", "0.0.0.0");<br> declArgs.put("port", (short) PORT);<br><br> channel.exchangeDeclare(xnameRaw, xtype, false, false, false, declArgs);<br> String q1 = channel.queueDeclare().getQueue();<br>
channel.queueBind(q1, xnameRaw, "#");<br><br> DatagramSocket u2 = new DatagramSocket();<br> DatagraPacket pOutRaw = new DatagramPacket(message, message.length, address, PORT);<br><br> u2.send(pOutRaw);<br>
channel.basicPublish(xnameRaw, routingKey, null, message);</i></font><br><div class="gmail_extra">-------------------------------------------------------------------------<br><br><br><br><div class="gmail_quote">2013/10/11 Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm afraid your message doesn't really give us much to go on, other than "it doesn't work".<br>
<br>
I suggest you try to break the problem down: when you send a UDP packet, can you see it reach the broker in wireshark? Can you see it go into a queue (bound to the UDP exchange with "#") in the management plugin? And so on.<br>
<br>
Also, out of interest, why do you want to use UDP instead of TCP?<br>
<br>
Cheers, Simon<br>
<br>
On 11/10/2013 10:27AM, Jorg Eloy wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi all,<br>
I'm looking another transport for AMQP in place of TCP,<br>
Nowadays, I'm trying work with UPD exchange of tonyg<br>
[<a href="https://github.com/tonyg/udp-exchange" target="_blank">https://github.com/tonyg/udp-<u></u>exchange</a>], with the plugin to rabbitmq, to<br>
get a similar scenario with publishers, consumers, queues and exchanges,<br>
But I can't get it.<br>
<br>
My actual situation is that:<br>
I send messages from the publisher to the exchange and these messages<br>
are not published, I can view in the web management tool how the<br>
delivery rate in the exchange is altered,<br>
I'm using basicPublish to publish the messages and QueueingConsumer to<br>
consume the messages, Also DatagramSockets and DatagramPackets to send<br>
and receive by UDP.<br>
But as I said before, these messages are don't received in the consumer.<br>
Including that I use the same routing keys in the messages and when<br>
I try sending messages directly to the queue created for the consumer,<br>
these messages arrive successfully<br>
<br>
Can someone know what is the error?<br>
<br>
Thanks in advance.<span class=""><font color="#888888"><br>
</font></span></blockquote><span class=""><font color="#888888">
<br>
<br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal<br>
</font></span></blockquote></div><br></div></div>