Skip to content

Can you please add a consumer example ? #5

Open
MaheshGooner opened this issue Nov 8, 2019 · 7 comments
Open

Can you please add a consumer example ? #5

MaheshGooner opened this issue Nov 8, 2019 · 7 comments

Comments

@MaheshGooner
Copy link

MaheshGooner commented Nov 8, 2019

Hi,

I would like to publish/consume messages from multiple hosts. is that already supported ?

One more thing can you please provide an example of reading messages from a existing queue and validate the message body in a gatling session please ?

@red-bashmak
Copy link
Contributor

For a publish/consume you may use amqp("Action name").requestReply action. Example here

@red-bashmak
Copy link
Contributor

For message body validation you may use various checks. For example check json body has no error field .check( bodyString.exists, jsonPath("$.error").notExists)

@MaheshGooner
Copy link
Author

Hi @red-bashmak. Thanks for the reply.
Regarding multiple hosts does the plugin support?

My use case is to publish messages to a topic based exchange using a routing key and consume from a different test queue binded to a different exchange. I want to measure the round trip/overall response durations. Not sure if this can be achieved with your plugin.

@red-bashmak
Copy link
Contributor

Execution on multiple hosts is possible if you create multiple protocols. And then pass to protocols(...) section of setUp. I havn't tested it, but this is a standard gatling mechanism, it should work.

@red-bashmak
Copy link
Contributor

I use this plugin in similar to yours case with only one difference, i send message to queue exchange (not in topic exchange). Sending to Topic exchanges isn't supported yet. But realisation that feature is not so complex task. I think i make it soon.

@MaheshGooner
Copy link
Author

MaheshGooner commented Nov 27, 2019

Sure. I was able to use your requestReply example and publish to a queue exchange and consume from a different queue. But I see a problem, I could get the overall response time if I run with only 1 user. If I try to apply more load one user consumes all the messages and I am not able to get overall pub/sub response time.

Do you think is there a way I could work around? I want my Gatling scenario to publish and consume a message and get the total response time per user.

@MaheshGooner
Copy link
Author

sorry closed by mistake

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants