Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure future compatibility with Quarkus 3.7 #48

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<assertj-core.version>3.24.2</assertj-core.version>
<weld.version>5.1.2.Final</weld.version>
<testcontainers-solace.version>1.18.3</testcontainers-solace.version>
<slf4j-log4j12.version>2.0.7</slf4j-log4j12.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -76,6 +77,12 @@
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-log4j12.version}</version>
<scope>test</scope>
</dependency>

</dependencies>
</dependencyManagement>
Expand Down
6 changes: 6 additions & 0 deletions quarkus-solace-client/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
Expand Down
6 changes: 6 additions & 0 deletions quarkus-solace-messaging-connector/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.solace.quarkus.samples;

import java.nio.charset.StandardCharsets;
import java.util.concurrent.CompletionStage;

import jakarta.enterprise.context.ApplicationScoped;

import org.eclipse.microprofile.reactive.messaging.*;

import com.solace.quarkus.messaging.incoming.SolaceInboundMessage;
import com.solace.messaging.receiver.InboundMessage;
import com.solace.quarkus.messaging.incoming.SolaceInboundMetadata;
import com.solace.quarkus.messaging.outgoing.SolaceOutboundMetadata;

import io.quarkus.logging.Log;
Expand All @@ -19,7 +17,7 @@ public class HelloConsumer {
/**
* Publishes message to topic hello/foobar which is subscribed by queue.foobar
*
* @see #consumeMessage(SolaceInboundMessage)
* @see #consumeMessage(InboundMessage)
* @return
*/
@Outgoing("hello-out")
Expand All @@ -35,11 +33,8 @@ Multi<Message<String>> publishMessage() {
* @param p
*/
@Incoming("hello-in")
@Acknowledgment(Acknowledgment.Strategy.MANUAL)
CompletionStage<Void> consumeMessage(SolaceInboundMessage<?> p) {
Log.infof("Received message: %s from topic: %s", new String(p.getMessage().getPayloadAsBytes(), StandardCharsets.UTF_8),
p.getMessage().getDestinationName());
return p.ack();
void consumeMessage(InboundMessage p) {
Log.infof("Received message: %s from topic: %s", p.getPayloadAsString(), p.getDestinationName());
}

/**
Expand All @@ -52,12 +47,12 @@ CompletionStage<Void> consumeMessage(SolaceInboundMessage<?> p) {
*/
@Incoming("dynamic-destination-in")
@Outgoing("dynamic-destination-out")
Message<?> consumeAndPublishToDynamicTopic(SolaceInboundMessage<?> p) {
Log.infof("Received message: %s from topic: %s", new String(p.getMessage().getPayloadAsBytes(), StandardCharsets.UTF_8),
p.getMessage().getDestinationName());
Message<?> consumeAndPublishToDynamicTopic(Message<?> p) {
SolaceInboundMetadata metadata = p.getMetadata(SolaceInboundMetadata.class).get();
Log.infof("Received message: %s from topic: %s", metadata.getPayloadAsString(), metadata.getDestinationName());
SolaceOutboundMetadata outboundMetadata = SolaceOutboundMetadata.builder()
.setApplicationMessageId("test")
.setDynamicDestination("hello/foobar/" + p.getMessage().getApplicationMessageId())
.setDynamicDestination("hello/foobar/" + metadata.getApplicationMessageId())
.createPubSubOutboundMetadata();
return p.addMetadata(outboundMetadata);
}
Expand Down
Loading