postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

Many connections seen on rabbitmq server while only one can be seen on client #455

Open simonxuhao opened 7 years ago

simonxuhao commented 7 years ago

I'm using node-amqp to connect to rabbitmq server and publish messages. On the rabbitmq server, I see tcp connections established from the client machine are constantly increasing, but on the client machine, I can only see one tcp connection to the server. Any idea?

Client: CentOS 6.6, nodejs-amqp 0.2.4 Server: CentOS 7.3, rabbitmq 3.6.9-1

reconnect is set to true in connection options.

Rabbitmq log:

accepting AMQP connection <0.1361.0> (93.46.8.89:46520 -> 192.168.10.172:8883) connection <0.1361.0> (93.46.8.89:46520 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.888.0> (93.46.8.89:34054 -> 192.168.10.172:8883) connection <0.888.0> (93.46.8.89:34054 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.8505.0> (93.46.8.89:58834 -> 192.168.10.172:8883) connection <0.8505.0> (93.46.8.89:58834 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.11099.0> (93.46.8.89:57220 -> 192.168.10.172:8883) connection <0.11099.0> (93.46.8.89:57220 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.14948.0> (93.46.8.89:37906 -> 192.168.10.172:8883) connection <0.14948.0> (93.46.8.89:37906 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.20192.0> (93.46.8.89:50542 -> 192.168.10.172:8883) connection <0.20192.0> (93.46.8.89:50542 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.24001.0> (93.46.8.89:38582 -> 192.168.10.172:8883) connection <0.24001.0> (93.46.8.89:38582 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.27884.0> (93.46.8.89:55450 -> 192.168.10.172:8883) connection <0.27884.0> (93.46.8.89:55450 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.557.1> (93.46.8.89:51490 -> 192.168.10.172:8883) connection <0.557.1> (93.46.8.89:51490 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.5790.1> (93.46.8.89:43744 -> 192.168.10.172:8883) connection <0.5790.1> (93.46.8.89:43744 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.13342.1> (93.46.8.89:47168 -> 192.168.10.172:8883) connection <0.13342.1> (93.46.8.89:47168 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost' accepting AMQP connection <0.15769.1> (93.46.8.89:56366 -> 192.168.10.172:8883) connection <0.15769.1> (93.46.8.89:56366 -> 192.168.10.172:8883): user 'producer_001' authenticated and granted access to vhost '/myvhost'

About every one hour, a new connection is established from the client to the server.