[rabbitmq-discuss] other transports besides TCP

Simon MacMullen simon at rabbitmq.com
Thu Oct 24 16:45:34 BST 2013


Did you see Matthias' response here?

http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2013-October/031215.html

I think his advice is sound. Get things working over TCP first, change 
one thing at a time.

Cheers, Simon

On 24/10/13 16:38, Jorg Eloy wrote:
> Hi Simon,
> Have you ever read my previous email?
> I'm very interested in consume messages by UDP.
> Greetings.
> Jorg
>
>
> 2013/10/16 Jorg Eloy <jluzuria2001 at gmail.com
> <mailto:jluzuria2001 at gmail.com>>
>
>     Hi Simon,
>
>     Thanks for your help, continue with our interest in consuming the
>     enqueued messages,
>     in order to get more than one consumer per queue.
>     Exist something similar to fanout exchange type in UPD?
>
>     Actually, I'm trying with UDP consumer without get it. So I've the
>     Consumer that I use with TCP transport,
>     and it's very strange, It works perfect when consumes messages from
>     a host where the brokerMQ is installed.
>     But when I try to consume messages from the other host, it's no
>     possible.
>     Besides that when I tried to declare the exchange and queue from the
>     another host different to the broker, These aren't created.
>
>     Any ideas?  What else should I try?
>     Best regards and thanks in advance,
>
>     Jorg
>
>
>     2013/10/15 Simon MacMullen <simon at rabbitmq.com
>     <mailto:simon at rabbitmq.com>>
>
>         Hi.
>
>         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.
>
>         Cheers, Simon
>
>
>         On 15/10/2013 09:25, Jorg Eloy wrote:
>
>             Hi Simon,
>
>             Thanks for your reply, let me said that when I sent messages
>             using UDP,
>             these messages are bounded to the queue in the channel with
>             this line of
>             code:
>             /channel.queueBind(q1, xnameRaw, "#");/
>
>
>             When I'm using Wireshark, I can view these messages arriving
>             to the
>             broker but they didn't reach to the exchange.
>
>             Why I'm using UDP instead of TCP is because I'm tried with
>             AMQP to work
>             with sensors and servers,
>             where sensors enqueue messages using UDP due to the typical
>             sensor data
>             is redundant an some loss can be tolerated
>             and the servers receive these messages using a channel
>             protocol over
>             TCP, The servers might use TCP to transport messages reliably.
>
>             Thanks again.
>
>
>             PD. Here I put some important lines of the code that I'm
>             using actually
>             to do this task.
>
>             ------------------------------__------------------------------__-------------
>             /    String xnameRaw = "UDP raw exchage for testing";
>
>                   String xtype = "x-udp";
>
>                   ConnectionFactory factory = new ConnectionFactory();
>
>                   Connection connection = factory.newConnection();
>                   Channel    channel = connection.createChannel();
>
>                   factory.setHost(BROKERMQ);
>                       factory.setUsername("guest");
>                       factory.setPassword("guest");
>                   factory.setPort(PORT);
>
>                   Map<String, Object> declArgs = new HashMap<String,
>             Object>();
>
>                   declArgs.put("ip", "0.0.0.0");
>                   declArgs.put("port", (short) PORT);
>
>                   channel.exchangeDeclare(__xnameRaw, xtype, false,
>             false, false,
>             declArgs);
>                   String q1 = channel.queueDeclare().__getQueue();
>                   channel.queueBind(q1, xnameRaw, "#");
>
>                   DatagramSocket u2 = new DatagramSocket();
>                   DatagraPacket pOutRaw = new DatagramPacket(message,
>             message.length,
>             address, PORT);
>
>                   u2.send(pOutRaw);
>                   channel.basicPublish(xnameRaw, routingKey, null,
>             message);/
>             ------------------------------__------------------------------__-------------
>
>
>
>             2013/10/11 Simon MacMullen <simon at rabbitmq.com
>             <mailto:simon at rabbitmq.com> <mailto:simon at rabbitmq.com
>             <mailto:simon at rabbitmq.com>>>
>
>
>                  I'm afraid your message doesn't really give us much to
>             go on, other
>                  than "it doesn't work".
>
>                  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.
>
>                  Also, out of interest, why do you want to use UDP
>             instead of TCP?
>
>                  Cheers, Simon
>
>                  On 11/10/2013 10:27AM, Jorg Eloy wrote:
>
>                      Hi all,
>                      I'm looking another transport for AMQP in place of TCP,
>                      Nowadays, I'm trying work with UPD exchange of tonyg
>                      [https://github.com/tonyg/udp-____exchange
>             <https://github.com/tonyg/udp-__exchange>
>
>                      <https://github.com/tonyg/udp-__exchange
>             <https://github.com/tonyg/udp-exchange>>], with the plugin to
>                      rabbitmq, to
>                      get a similar scenario with publishers, consumers,
>             queues and
>                      exchanges,
>                      But I can't get it.
>
>                      My actual situation is that:
>                      I send messages from the publisher to the exchange
>             and these
>                      messages
>                      are not published, I can view in the web management
>             tool how the
>                      delivery rate in the exchange is altered,
>                      I'm using basicPublish to publish the messages and
>                      QueueingConsumer to
>                      consume the messages, Also DatagramSockets and
>             DatagramPackets
>                      to send
>                      and receive by UDP.
>                      But as I said before, these messages are don't
>             received in the
>                      consumer.
>                      Including that I use the same routing keys in the
>             messages and when
>                      I try sending messages directly to the queue
>             created for the
>                      consumer,
>                      these messages arrive successfully
>
>                      Can someone know what is the error?
>
>                      Thanks in advance.
>
>
>
>
>                  --
>                  Simon MacMullen
>                  RabbitMQ, Pivotal
>
>
>
>
>


-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list