0

Am new to topic and subscriber methodology and trying to explore topic subscriber method to post a message over topic and subscribing the posted message in client.

When I studied about this method I read in some article that connection between producer and the subscriber will not terminated until the producer or subscriber goes down. So I tried to check with the connection status using Wireshark to know how much packets are transferring and how often packet transfer is taking place between producer and subscriber I got the following result.

The following as the result generated when I check the connection status using Wireshark

For my knowledge can anyone please explain me what is happening over the network? Is the packets are transferring to keep connection alive? If so then packets are transferring every 10 seconds, is any possible to increase the time from 10 seconds to 30 seconds?

Why am asking for the possibility is for one client to keep connection alive, for every 10 seconds around 190 bytes. If I use multiple clients around 3500 then I think it may cause network issue so.

Am using Java 6 with ActiveMQ to explore about this.

Thanks in advance.

Bhuvanesh Waran
  • 593
  • 12
  • 28

1 Answers1

0

You can pla around with the maxInactivityDuration settings on broker and client transports to increase the timeout to a point where the pings are sent at a period you feel comfortable with. The thing to keep in mind is that the longer the inactivity duration the longer it could take for a broker to notice that a client connection had dropped should the socket not close in such a way that a fin packet is sent.

The client and broker won't send keep alive frames to each other should there be other message traffic on the wire, only when the connection is idle.

Tim Bish
  • 17,475
  • 4
  • 32
  • 42
  • I dont want to make the broker and client connection to be time out. I need to keep the connection between both broker and client alive until broker or client is goes down. In this case there is any possibility to make delay of checking keep alive in connection. And also I need to know for my knowledge the packets transmitting for each 10 sec is to check the connection is alive in the above image which i attached? – Bhuvanesh Waran Aug 31 '16 at 01:58
  • And one more thing I get to confirm maxInactivityDuration property in client side is to make the connection time out after the mentioned period right? – Bhuvanesh Waran Aug 31 '16 at 02:00
  • Can't really parse what it is you are asking, but the source if open, feel free to dive in and play. – Tim Bish Aug 31 '16 at 12:51
  • Sorry for late reply, and thank you @Tim Bish finally i set **maxInactivityDuration** as **0** and problem has been resolved. – Bhuvanesh Waran Sep 05 '16 at 02:36