bloomberg / amqpprox

An AMQP 0.9.1 proxy server, designed for use in front of an AMQP 0.9.1 compliant message queue broker such as RabbitMQ.
Apache License 2.0
78 stars 16 forks source link

perf tester: Count messages/handle channel close/listen backlog #70

Closed adamncasey closed 2 years ago

adamncasey commented 2 years ago

While testing #69 I found a few issues with the perf tester:

  1. A packet capture showed that we were sending two messages when it should only send one.
  2. Same capture showed that there was a shutdown issue due to amiquip sending channel close and us replying with channel openok - oops. The channel close doesn't seem to be sent since making the connection close explicit, but I left this fix in for future use.
  3. Changed the connection close to be explicit. But I am purposefully ignoring the result since sometimes this fails - which just seems to be when the server shuts the socket down before the client - when testing locally it seems like the client sends FIN first most of the time. I feel like the amqp library should probably ignore this case, but I'm also not sure how amqpprox handles this either so I probably can't be too upset - we do log a lot when connection are closing.