walterwanderley / xk6-stomp Goto Github PK
View Code? Open in Web Editor NEWA STOMP protocol client library for k6
License: Apache License 2.0
A STOMP protocol client library for k6
License: Apache License 2.0
Default Host of Rabbiqmq and ActiveMq is different. As Host is currently not in options, so stomp can't be connected with rabbitmq default host. For testing in rabbitmq, I have hardcodedly added hostname in code. It's working with rabbitmq now.
You can check sample change in here.
shariq-1994@50292a2
Can we have flag to skip TLS certificate verification. I have also raised with a solution
#13
I've run xk6-stomp to test stomp over websocket implemented by using spring boot and get the following error during teardown.
DEBU[0060] Executor finished successfully executor=default startTime=0s type=per-vu-iterations
DEBU[0060] Running teardown() phase=local-execution-scheduler-run
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x9caf61]
default [--------------------------------------] 1 VUs 01m00.0s/10m0s 0/1 iters, 1 per VU
goroutine 87 [running]:
go.k6.io/k6/metrics.PushIfNotDone(...)
go.k6.io/[email protected]/metrics/sample.go:119
github.com/walterwanderley/xk6-stomp/stomp.(*Client).reportStats(0xc0015f4cf0, 0xc000771680, 0x0, {0x0?, 0x0?, 0x2009ca0?}, 0x0)
github.com/walterwanderley/[email protected]/stomp/stomp.go:388 +0x1a1
github.com/walterwanderley/xk6-stomp/stomp.(*StatsReadWriteClose).Read(0xc0012d6060, {0xc000b34000?, 0x0?, 0xc0022f7ca0?})
github.com/walterwanderley/[email protected]/stomp/stats.go:94 +0x7c
The STOMP wss service I'm trying to connect to requires passing query string parameters in order to establish a valid connection.
Looking at the available Options
parameters for the Connect
func - I couldn't find the proper one to use for passing the query params. If I pass query params to the path
option (e.g. path: '/v1/ws?country=UK&locale=en'
) - the question mark (?
) gets replaced (URL-encoded?) with %3F
ASCII characters (from what I understand). And connection is rejcted by the server.
Is the a way to pass query params to the connection address? Could you please help?
P.S. Thanks a lot for the great xk6 extension @walterwanderley. Looking forward to be able to use it in my performance tests with the k6.
We've recently updated the requirements for maintaining an extension within the listing on our site. As such, please address the following items to maintain your listing within the registry:
examples
directory containing k6 test scripts making use of your extensionFor more information on these and other listing requirements, please take a look at the registry requirements.
I would like to ignore this in stomp and wss, just like tls validation is ignored in http requests, but it doesn't seem to work. Do I need to do something special for this?
We are upgrading k6 to 0.49.0, can you please upgrade the dependency to the latest one. I have also raised a PR for the same
#11
The upgrade to v0.38.0 has some breaking changes, see the below release notes.
The reason for this is if you need to build a k6 runner with multiple extensions. For example the below will fail.
xk6 build \
--with github.com/walterwanderley/xk6-stomp \
--with github.com/grafana/xk6-output-influxdb
The Go types in the stats package were moved to the metrics package grafana/k6#2433
For convenience and to facilitate further developments, the types and functionalities that used to live in k6's stats package have been moved to the metrics package. The stats package is, as of v0.38.0, removed in favor of the metrics package. Besides, grafana/k6#2442 removed the stats.New function in favor of initializing new metric via a register.NewMetric call instead.
Hi
I have installed your plugin, did connect to the server but got read error for first message I've got. Issue here is that server is sending messages in sockJS. I'd like to ask if there is plan to implement sockJS if server uses this kind of messages.
Thank you.
Hi,
I cannot figure out from the examples if it is possible to add headers on client.subscribe(). I have the following code;
// Connect to STOMP over WS
const client = stomp.connect({
protocol: 'wss',
addr: 'localhost:443',
path: '/ws',
timeout: '10s',
heartbeat: {
incoming: '30s',
outgoing: '30s',
},
message_send_timeout: '5s',
receipt_timeout: '10s',
verbose: true
});
const subscribeOpts = {
ack: 'auto', // client-individual or auto (default)
}
// subscribe to receive messages from 'my/destination' with the client ack mode
const subscription = client.subscribe('/user/notify/orderReservation', subscribeOpts);
I have tried to add header: { id: idToSubscribeTo }
in the subscibeOpts object but that won't work. Is it supported in the library to add headers to the subscribe function?
I have verified that it is connecting to my websocket and subscribes to /user/notify/orderReservation that i have set up but it doesn't append the headers.
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.