Rabbitmq Wireless - Data Connection

35 views
Skip to first unread message

BaBaK Raufi

unread,
Mar 14, 2016, 9:54:27 AM3/14/16
to rabbitmq-users
Hi.
I'm using rabbitmq. 
My client is android (java). 
I have some problem. When I connect to server with AMQP protocol and wireless connection and decided to change my connection to Data (LTE) I have to wait for heartbeat timeout to establish a new consumer. I set the consumer Exclusive, But in vice versa situation, I mean the rabbit connect with LTE network and I change to Wireless immediately the previous consumer close and the new one establish without waiting for heartbeat timeout. why? 

I try to use basicCancel, but after changing my IP address it's not possible to close the previous one.

what are the differences between wireless and data connection ?

Michael Klishin

unread,
Mar 14, 2016, 2:04:02 PM3/14/16
to rabbitm...@googlegroups.com
If client active network interface and thus IP changes mid-flight, all open TCP connections can no longer function so Android/Linux probably closes them immediately for that reason.

RabbitMQ cannot possibly control this. Your app has to recover the connection (automatic recovery mode should work).

BaBaK Raufi

unread,
Mar 16, 2016, 5:21:48 AM3/16/16
to rabbitmq-users
Thanks a lot Michael for your answer, But maybe Rabbitmq detect the type of the connection (Wireless/LTE) and set some timeouts on connection. I set all timeouts manually and nothing happens, everything like before changing. Maybe there are some protected params that rabbit set them by own. 

Michael Klishin

unread,
Mar 16, 2016, 6:03:49 AM3/16/16
to rabbitm...@googlegroups.com
RabbitMQ cannot have features specific to mobile devices. Heartbeat interval is configurable and there is a default (60 seconds in the most recent release) but it is never altered by the client if you set it.

You can define a socket configurator on ConnectionFactory to do the kind of advanced configuration you need.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ
Message has been deleted

BaBaK Raufi

unread,
Mar 16, 2016, 6:49:58 AM3/16/16
to rabbitmq-users
This is my Socket configuration :

   connectionFactory.setSocketConfigurator(new SocketConfigurator() {
                                                    @Override
                                                    public void configure(Socket socket) throws IOException {
                                                        socket.setSoTimeout(0);
                                                        socket.setKeepAlive(true);
                                                        socket.setTcpNoDelay(true);
                                                        socket.setReceiveBufferSize(2 * 1024);
                                                        socket.setSendBufferSize(2 * 1024);


                                                    }
                                                }
        );
Reply all
Reply to author
Forward
0 new messages