Gatling version: 3.11.2
Gatling flavor: java
Gatling build tool: maven
Hello
I was very excited to upgrade to Gatling version 3.11.2 and use the processUnmatchedMessages feature.
- Please confirm that the below code snipet is correct with ws.processUnmatchedMessages rather than sse.processUnmatchedMessages
- Could you please provide a little more guidance as to how use this feature correctly?
public static ChainBuilder checkUnmatchedMessages() {
return exec(
// store the unmatched messages in the Session
sse.processUnmatchedMessages(
(messages, session) -> session.set("messages", messages)
),
// collect the last message and store it in the Session - My understanding is that this is
//optional and is there to give an idea of how processUnmatchedMessages could be used
sse.processUnmatchedMessages(
(messages, session) ->
!messages.isEmpty()
? session.set("lastMessage", messages.get(messages.size() - 1).message())
: session),
exec(
session -> {
System.out.println("this is the unmatched messages: " + session.get("messages"));
return session;
}
)
);
}
I am placing checkUnmatchedMessages() just after the request that triggers the sse event data that I’m trying to capture.The hope here is to see the UnmatchedMessages captured in the session data. However, nothing is being captured. could you please advise wether this is the intended use? I have also placed .sseUnmatchedInboundMessageBufferSize(5) - in my protocol as advised in the documentation.
This is my first query so please be kind. Happy to provide more info if needed. thank you in advance!