grafana / xk6-amqp

A k6 extension for publishing and consuming messages from queues and exchanges using AMQP 0.9.1.
Apache License 2.0
25 stars 28 forks source link

AMQP v1.0 is not supported #21

Closed faisal6621 closed 1 year ago

faisal6621 commented 1 year ago

I am using ActiveMQ 5.15.x and this is unable to work due to incompatible version of AMQP used.

The error in console for k6 command is:

INFO[0000] K6 amqp extension enabled, version: v0.1.0    source=console
ERRO[0000] GoError: Exception (501) Reason: "Exception (501) Reason: \"frame could not be parsed\""
        at reflect.methodValueCall (native)
        at file:///D:/projects/xk6-amqp/xk6-amqp.js:9:25(19)  executor=per-vu-iterations scenario=default source=stacktrace

And there is warning in ActiveMQ console as well:

WARN | Connection attempt from non AMQP v1.0 client. AMQP,0,0,9,1
 WARN | Transport Connection to: tcp://0:0:0:0:0:0:0:1:63017 failed: org.apache.activemq.transport.amqp.AmqpProtocolException: Connection from client using unsupported AMQP attempted
javaducky commented 1 year ago

Hi @faisal6621, thank you for bringing this to our attention! I'll need to dig into the issue further and investigate possibly switching to another AMQP client library; it appears the current implementation we use (streadway/amqp) is no longer being maintained and only supports the older protocol version.

javaducky commented 1 year ago

Digging into this further, it appears that the AMQP 0.9.1 and 1.0 protocols are drastically different and that no single client handles both therefore, this particular extension will not support AMQP 1.0 and beyond. A separate extension project will need to be created to support the newer protocol.

faisal6621 commented 1 year ago

In that case the project's README should be update to help visitor understand this limitation when using ActiveMQ.

javaducky commented 1 year ago

In that case the project's README should be update to help visitor understand this limitation when using ActiveMQ.

Agreed. I'll be doing some more background and will be updating that. I've already updated the repository description to specify that only 0.9.1 is supported as well.