diff --git a/samples/hello-connector-solace/src/main/java/com/solace/quarkus/samples/HelloConsumer.java b/samples/hello-connector-solace/src/main/java/com/solace/quarkus/samples/HelloConsumer.java index 8978223..745affc 100644 --- a/samples/hello-connector-solace/src/main/java/com/solace/quarkus/samples/HelloConsumer.java +++ b/samples/hello-connector-solace/src/main/java/com/solace/quarkus/samples/HelloConsumer.java @@ -52,7 +52,6 @@ CompletionStage consumeMessage(SolaceInboundMessage p) { */ @Incoming("dynamic-destination-in") @Outgoing("dynamic-destination-out") - @Acknowledgment(Acknowledgment.Strategy.MANUAL) Message consumeAndPublishToDynamicTopic(SolaceInboundMessage p) { Log.infof("Received message: %s from topic: %s", new String(p.getMessage().getPayloadAsBytes(), StandardCharsets.UTF_8), p.getMessage().getDestinationName()); @@ -60,8 +59,7 @@ Message consumeAndPublishToDynamicTopic(SolaceInboundMessage p) { .setApplicationMessageId("test") .setDynamicDestination("hello/foobar/" + p.getMessage().getApplicationMessageId()) .createPubSubOutboundMetadata(); - Message outboundMessage = Message.of(p.getPayload(), Metadata.of(outboundMetadata)); - return outboundMessage; + return p.addMetadata(outboundMetadata).withAck(() -> p.ack()); } } diff --git a/samples/hello-connector-solace/src/main/java/com/solace/quarkus/samples/PublisherResource.java b/samples/hello-connector-solace/src/main/java/com/solace/quarkus/samples/PublisherResource.java index 3b9ebc8..601ce63 100644 --- a/samples/hello-connector-solace/src/main/java/com/solace/quarkus/samples/PublisherResource.java +++ b/samples/hello-connector-solace/src/main/java/com/solace/quarkus/samples/PublisherResource.java @@ -15,7 +15,7 @@ @Path("/hello") public class PublisherResource { - @Channel("hello") + @Channel("hello-out") MutinyEmitter foobar; /** diff --git a/samples/hello-connector-solace/src/main/resources/application.properties b/samples/hello-connector-solace/src/main/resources/application.properties index c6bc966..c0d8f33 100644 --- a/samples/hello-connector-solace/src/main/resources/application.properties +++ b/samples/hello-connector-solace/src/main/resources/application.properties @@ -5,6 +5,7 @@ mp.messaging.outgoing.hello-out.connector=quarkus-solace mp.messaging.outgoing.hello-out.producer.topic=hello/foobar +mp.messaging.outgoing.hello-out.merge=true mp.messaging.incoming.hello-in.connector=quarkus-solace mp.messaging.incoming.hello-in.consumer.queue.supports-nacks=true @@ -20,7 +21,7 @@ mp.messaging.incoming.dynamic-destination-in.consumer.queue.name=queue.dynamic.t mp.messaging.incoming.dynamic-destination-in.consumer.queue.missing-resource-creation-strategy=create-on-start mp.messaging.incoming.dynamic-destination-in.consumer.queue.type=durable-exclusive mp.messaging.incoming.dynamic-destination-in.consumer.queue.add-additional-subscriptions=true -mp.messaging.incoming.dynamic-destination-in.consumer.queue.subscriptions=hello/foobar +mp.messaging.incoming.dynamic-destination-in.consumer.queue.subscriptions=test/topic/> mp.messaging.outgoing.dynamic-destination-out.connector=quarkus-solace -mp.messaging.outgoing.dynamic-destination-out.producer.topic=hello/foobar +mp.messaging.outgoing.dynamic-destination-out.producer.topic=test/dynamic/topic