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

Fix the split package between the smallrye-reactive-messaging-jackson and smallrye-reactive-messaging-jsonb modules #2272

Merged
merged 2 commits into from
Aug 24, 2023
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jackson;

import jakarta.annotation.Priority;
import jakarta.enterprise.context.ApplicationScoped;
Expand All @@ -7,6 +7,8 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import io.smallrye.reactive.messaging.json.JsonMapping;

@ApplicationScoped
@Priority(value = JsonMapping.DEFAULT_PRIORITY)
public class JacksonMapping implements JsonMapping {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jackson;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jackson;

import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jackson;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Produces;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jackson;

public class Person {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jackson;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jackson;

import jakarta.enterprise.context.ApplicationScoped;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jackson;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.smallrye.reactive.messaging.json.JsonMapping;

/**
* Test object to use in {@link JsonMapping} implementation.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import io.smallrye.config.SmallRyeConfigProviderResolver;
import io.smallrye.config.inject.ConfigExtension;
import io.smallrye.reactive.messaging.jms.JmsConnector;
import io.smallrye.reactive.messaging.json.JacksonMapping;
import io.smallrye.reactive.messaging.json.ObjectMapperProvider;
import io.smallrye.reactive.messaging.json.jackson.JacksonMapping;
import io.smallrye.reactive.messaging.json.jackson.ObjectMapperProvider;
import io.smallrye.reactive.messaging.providers.MediatorFactory;
import io.smallrye.reactive.messaging.providers.connectors.ExecutionHolder;
import io.smallrye.reactive.messaging.providers.connectors.WorkerPoolRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jsonb;

import jakarta.annotation.Priority;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import jakarta.json.bind.Jsonb;

import io.smallrye.reactive.messaging.json.JsonMapping;

@ApplicationScoped
@Priority(value = JsonMapping.DEFAULT_PRIORITY + 1)
public class JsonBMapping implements JsonMapping {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jsonb;

import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jsonb;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jsonb;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Produces;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jsonb;

public class Person {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jsonb;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jsonb;

import jakarta.enterprise.context.ApplicationScoped;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package io.smallrye.reactive.messaging.json;
package io.smallrye.reactive.messaging.json.jsonb;

import jakarta.json.bind.annotation.JsonbProperty;

import io.smallrye.reactive.messaging.json.JsonMapping;

/**
* Test object to use in {@link JsonMapping} implementation.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import io.smallrye.config.SmallRyeConfigProviderResolver;
import io.smallrye.config.inject.ConfigExtension;
import io.smallrye.reactive.messaging.jms.JmsConnector;
import io.smallrye.reactive.messaging.json.JsonBMapping;
import io.smallrye.reactive.messaging.json.JsonBProvider;
import io.smallrye.reactive.messaging.json.jsonb.JsonBMapping;
import io.smallrye.reactive.messaging.json.jsonb.JsonBProvider;
import io.smallrye.reactive.messaging.providers.MediatorFactory;
import io.smallrye.reactive.messaging.providers.connectors.ExecutionHolder;
import io.smallrye.reactive.messaging.providers.connectors.WorkerPoolRegistry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ private void awaitAndVerify() {
.pollInterval(Duration.ofSeconds(1))
.until(() -> connector.getReadiness().isOk());

await()
.pollInterval(Duration.ofSeconds(1))
.until(() -> connector.getLiveness().isOk());

bean.publish();

await().until(() -> bean.messages().size() >= 3);
Expand Down Expand Up @@ -155,23 +159,36 @@ public void publish() {
emitter.send(MqttMessage
.of("/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 1",
MqttQoS.EXACTLY_ONCE));
nap(10);
emitter.send(MqttMessage
.of("/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 2",
MqttQoS.EXACTLY_ONCE));
nap(10);
emitter.send(MqttMessage
.of("/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 3",
MqttQoS.EXACTLY_ONCE));
nap(15);
emitter.send(MqttMessage
.of("$/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 4",
MqttQoS.EXACTLY_ONCE));
nap(10);
emitter.send(MqttMessage
.of("$/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 5",
MqttQoS.EXACTLY_ONCE));
nap(5);
emitter.send(MqttMessage
.of("$/app/hello/mqtt-" + LocalDate.now().toString() + "/greeting", "hello from dynamic topic 6",
MqttQoS.EXACTLY_ONCE));
}

private void nap(int duration) {
try {
Thread.sleep(duration);
} catch (Exception ignored) {
// ignored.
}
}

@Incoming("in")
public CompletionStage<Void> received(MqttMessage<byte[]> message) {
messages.add(message);
Expand Down
Loading