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 27 forks source link

GoError: Exception (501) Reason: "EOF" #37

Open Lamardo43 opened 10 months ago

Lamardo43 commented 10 months ago

HI, @javaducky!

At the very beginning of using your library, I encountered difficulties that I can't find an answer to. I took your very first example, changed only the url in it (even without changing it, I get an error, which is logical)(I use other letters, but their count and case match my original).

`import Amqp from 'k6/x/amqp'; import Queue from 'k6/x/amqp/queue';

export default function () { console.log("K6 amqp extension enabled, version: " + Amqp.version)

const url = "amqp://qa:Lalal765434!@jhvhg-fds094sd.zcxv.sad.com:1414/"

Amqp.start({
    connection_url: url
})
console.log("Connection opened: " + url)

const queueName = 'K6 general'

Queue.declare({
    name: queueName,
    // durable: false,
    // delete_when_unused: false,
    // exclusive: false,
    // no_wait: false,
    // args: null
})

console.log(queueName + " queue is ready")

Amqp.publish({
    queue_name: queueName,
    body: "Ping from k6",
    content_type: "text/plain"
    // timestamp: Math.round(Date.now() / 1000)
    // exchange: '',
    // mandatory: false,
    // immediate: false,
    // headers: {
    //   'header-1': '',
    // },
})

const listener = function (data) { console.log('received data: ' + data) }
Amqp.listen({
    queue_name: queueName,
    listener: listener,
    // consumer: '',
    // auto_ack: true,
    // exclusive: false,
    // no_local: false,
    // no_wait: false,
    // args: null
})

} `

But, alas, it doesn't work and I get an error like:

INFO[0000] K6 amqp extension enabled, version: v0.4.1 source=console ERRO[0002] GoError: Exception (501) Reason: "EOF" running at reflect.methodValueCall (native) default at file:///C:/Users/vxczvi/xczvzx/pvcxv/index.js:9:13(18) executor=per-vu-iterations scenario=default source=stacktrace

Yes, I saw issue #5, but I didn't find anything useful there for myself

Thank you very much for your help!

Lamardo43 commented 10 months ago

So I added that I use the library to download a script written in LoadRunner java, which uses IBM and jms. I didn't make a mistake with the choice, can I use your library to achieve these goals?

javaducky commented 10 months ago

Hello @Lamardo43!

Sorry for the confusion with this extension! It has fallen into neglect. The extension needs a complete re-write using the latest event model supported by k6. At this time, we intend to delist and deprecate the unless we can find another maintainer.

While any messaging backend supporting AMQP 0.9.1 should be supported, we cannot guarantee it at this time.