Skip to content

Include bytesMessage in PublishDslBuilderMessage.java #101

Open
hjklapp opened this issue Apr 5, 2023 · 2 comments
Open

Include bytesMessage in PublishDslBuilderMessage.java #101

hjklapp opened this issue Apr 5, 2023 · 2 comments

Comments

@hjklapp
Copy link

hjklapp commented Apr 5, 2023

Sending byte messages to Rabbitmq/amqp is possible in scala, but missing from the java wrapper.

Please include bytesMessage in PublishDslBuilderMessage.java, wrapping ru.tinkoff.gatling.amqp.request.PublishDslBuilderMessage.bytesMessage.

@tibi-billie
Copy link

That would be great, I am missing this as I am trying to send a serialized protobuf message.
Until this is added, is there some workaround maybe I could use?
Thanks a lot!

@hjklapp
Copy link
Author

hjklapp commented May 23, 2023

As a workaround I used the underlying DSL, something like this

  private val sendMessage: ScenarioBuilder = scenario("Send message")
    .exec { session -> session.set("message", byteMessage) }
    .exec(
        PublishDslBuilder(
            ru.tinkoff.gatling.amqp.Predef.amqp(toStringExpression("Send message"))
              .publish(Predef.configuration())
              .topicExchange(
                  toStringExpression(EXCHANGE),
                  toStringExpression(ROUTING_KEY))
              .bytesMessage(toBytesExpression("#{message}"))).priority(0)
    )

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