I want to send a Java (well Kotlin) POJO as JSON in an AMQP message to RabbitMQ using Quarkus.
@Path("/amqp")
class TestSource {
@Inject
@Channel("amqpwrite")
lateinit var emitter: Emitter<MonitoringStatusDto>
@POST
@Path("/send")
fun sendMsg() {
val status = MonitoringStatusDto(status = "OK", message = "test amqp write")
emitter.send(status)
}
}
On the rabbit queue the message is received as base64 encoded byte stream.
How can I set the headers here to put the content type in it? Also header settings like TTL might be interesting.