xk6-amqp icon indicating copy to clipboard operation
xk6-amqp copied to clipboard

GoError: Exception (501) Reason: "EOF"

Open Lamardo43 opened this issue 2 years ago • 2 comments
trafficstars

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:[email protected]: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 avatar Nov 16 '23 13:11 Lamardo43

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?

Lamardo43 avatar Nov 16 '23 14:11 Lamardo43

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.

javaducky avatar Nov 20 '23 16:11 javaducky