Search in sources :

Example 1 with QpidProtonCodec

use of com.rabbitmq.stream.codec.QpidProtonCodec in project rabbitmq-stream-java-client by rabbitmq.

the class ClientTest method publishConsumeComplexMessageWithMessageBuilderAndQpidProtonCodec.

@Test
void publishConsumeComplexMessageWithMessageBuilderAndQpidProtonCodec() {
    Codec codec = new QpidProtonCodec();
    Client publisher = cf.get(new Client.ClientParameters().codec(codec));
    publishConsumeComplexMessage(publisher, codec, i -> publisher.messageBuilder().applicationProperties().entry("id", i).messageBuilder().addData(("message" + i).getBytes(StandardCharsets.UTF_8)).build());
}
Also used : QpidProtonCodec(com.rabbitmq.stream.codec.QpidProtonCodec) SimpleCodec(com.rabbitmq.stream.codec.SimpleCodec) SwiftMqCodec(com.rabbitmq.stream.codec.SwiftMqCodec) QpidProtonCodec(com.rabbitmq.stream.codec.QpidProtonCodec) ClientParameters(com.rabbitmq.stream.impl.Client.ClientParameters) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

QpidProtonCodec (com.rabbitmq.stream.codec.QpidProtonCodec)1 SimpleCodec (com.rabbitmq.stream.codec.SimpleCodec)1 SwiftMqCodec (com.rabbitmq.stream.codec.SwiftMqCodec)1 ClientParameters (com.rabbitmq.stream.impl.Client.ClientParameters)1 Test (org.junit.jupiter.api.Test)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1