<div dir="ltr">Hi Simon,<br><br>Thanks for your help, continue with our interest in consuming the enqueued messages, <br>in order to get more than one consumer per queue.<br>Exist something similar to fanout exchange type in UPD?<br>
<br>Actually, I'm trying with UDP consumer without get it. So I've the Consumer that I use with TCP transport,<br>and it's very strange, It works perfect when consumes messages from a host where the brokerMQ is installed.<br>
But when I try to consume messages from the other host, it's no possible.<br>Besides that when I tried to declare the exchange and queue from the another host different to the broker, These aren't created.<br><br>
Any ideas? What else should I try?<br>Best regards and thanks in advance,<br><br>Jorg<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/15 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi.<br>
<br>
I compiled your code and it works for me. I had to provide the address and port for the DatagramPacket, so you probably want to make sure those are correct. Also make sure the packet is not being eaten by a firewall.<br>
<br>
Cheers, Simon<div class="im"><br>
<br>
On 15/10/2013 09:25, Jorg Eloy wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
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<br>
code:<br></div>
/channel.queueBind(q1, xnameRaw, "#");/<div class="im"><br>
<br>
When I'm using Wireshark, I can view these messages arriving to the<br>
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<br>
with sensors and servers,<br>
where sensors enqueue messages using UDP due to the typical sensor data<br>
is redundant an some loss can be tolerated<br>
and the servers receive these messages using a channel protocol over<br>
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<br>
to do this task.<br>
<br>
------------------------------<u></u>------------------------------<u></u>-------------<br></div>
/ String xnameRaw = "UDP raw exchage for testing";<div class="im"><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(<u></u>xnameRaw, xtype, false, false, false,<br>
declArgs);<br>
String q1 = channel.queueDeclare().<u></u>getQueue();<br>
channel.queueBind(q1, xnameRaw, "#");<br>
<br>
DatagramSocket u2 = new DatagramSocket();<br>
DatagraPacket pOutRaw = new DatagramPacket(message, message.length,<br>
address, PORT);<br>
<br>
u2.send(pOutRaw);<br></div>
channel.basicPublish(xnameRaw, routingKey, null, message);/<br>
------------------------------<u></u>------------------------------<u></u>-------------<br>
<br>
<br>
<br>
2013/10/11 Simon MacMullen <<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a> <mailto:<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>>><div class="im"><br>
<br>
I'm afraid your message doesn't really give us much to go on, other<br>
than "it doesn't work".<br>
<br>
I suggest you try to break the problem down: when you send a UDP<br>
packet, can you see it reach the broker in wireshark? Can you see it<br>
go into a queue (bound to the UDP exchange with "#") in the<br>
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>
<br>
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></div>
[<a href="https://github.com/tonyg/udp-__exchange" target="_blank">https://github.com/tonyg/udp-<u></u>__exchange</a><div><div class="h5"><br>
<<a href="https://github.com/tonyg/udp-exchange" target="_blank">https://github.com/tonyg/udp-<u></u>exchange</a>>], with the plugin to<br>
rabbitmq, to<br>
get a similar scenario with publishers, consumers, queues and<br>
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<br>
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<br>
QueueingConsumer to<br>
consume the messages, Also DatagramSockets and DatagramPackets<br>
to send<br>
and receive by UDP.<br>
But as I said before, these messages are don't received in the<br>
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<br>
consumer,<br>
these messages arrive successfully<br>
<br>
Can someone know what is the error?<br>
<br>
Thanks in advance.<br>
<br>
<br>
<br>
<br>
--<br>
Simon MacMullen<br>
RabbitMQ, Pivotal<br>
<br>
<br>
</div></div></blockquote>
<br>
</blockquote></div><br></div>