JMS feature suggestion: custom message builder (and sender)

Recently we tried gatling for stressing a somewhat special piece of a JMS messaging system, where using standard gatling dsl methods of building messages (text/object/binary/map) were undesired and actually not possible. On the other hand, building a whole custom protocol only to send a message does seem to be overkill.

Before creating an issue and a pull request, I would like to check whether it could be a useful extension to add a fifth method of jms message creation (customMessage or something), which would take care of building and sending the message itself? It would return a correlation/message id, preferably taking the jmsSession in addition to the gatling’s session as input parameters.

Thank you,

Mykola.

Could you please elaborate and concretely describe your use case?
It looks to me you just need a method for sending a Expression[javax.jms.Message].

Could you please elaborate and concretely describe your use case?
It looks to me you just need a method for sending a Expression[javax.jms.Message].

I would need a method not only for sending, but also for the construction. Basically one more method of sort io.gatling.jms.client.JmsClient#sendXXXMessage. Something like

trait JmsClient {


def sendCustomMessage(func: (io.gatling.core.session.Session, java.jmx.Session) => Message ) : Message

}

I should admit though that the more I look at my suggestion, the less convinced I feel that it would bring much value to the general public. Looks like a custom actor copying much of io.gatling.jms.action.JmsReqReplyActor would be the proper way to go.

I would need a method not only for sending, but also for the construction.

Expression[T] is exactly that.

def sendCustomMessage(func: (io.gatling.core.session.Session,
java.jms.Session) => Message ) : Message

Please explain why you need the message constructor to be aware of the
java.jms.Session.