Skip to content

Commit

Permalink
Addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SravanThotakura05 committed Jan 29, 2024
1 parent 88555ba commit fc36d56
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,14 @@ CompletionStage<Void> 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());
SolaceOutboundMetadata outboundMetadata = SolaceOutboundMetadata.builder()
.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());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@Path("/hello")
public class PublisherResource {

@Channel("hello")
@Channel("hello-out")
MutinyEmitter<Person> foobar;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit fc36d56

Please sign in to comment.