Skip to content

Commit

Permalink
chore: clean codes
Browse files Browse the repository at this point in the history
  • Loading branch information
hantsy committed Apr 29, 2024
1 parent 9411a96 commit c711057
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion kafka/src/main/java/com/example/MessageHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void send(String message) {
}

@Incoming("messages")
@Outgoing("data-stream")
@Outgoing("data-result")
@Broadcast
Message receive(String message) {
log.info("received: {}", message);
Expand Down
2 changes: 1 addition & 1 deletion kafka/src/test/java/com/example/InMemoryProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public Map<String, String> getConfigOverrides() {
"quarkus.kafka.devservices.enabled", "false",
"mp.messaging.outgoing.send.connector","smallrye-in-memory",
"mp.messaging.incoming.messages.connector","smallrye-in-memory",
"mp.messaging.outgoing.data-stream.connector","smallrye-in-memory"
"mp.messaging.outgoing.data-result.connector","smallrye-in-memory"
);
}

Expand Down
2 changes: 1 addition & 1 deletion kafka/src/test/java/com/example/MessageHandlerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void setUp() {
void receive() {
InMemorySource<String> messages = connector.source("messages");
InMemorySink<String> sink = connector.sink("send");
InMemorySink<Message> dataStream = connector.sink("data-stream");
InMemorySink<Message> dataStream = connector.sink("data-result");

handler.send("hello");
await().atMost(Duration.ofMillis(1000)).untilAsserted(() ->
Expand Down
2 changes: 1 addition & 1 deletion pulsar/src/main/java/com/example/MessageHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void send(String message) {
}

@Incoming("messages")
@Outgoing("data-stream")
@Outgoing("data-result")
@Broadcast
Message receive(String message) {
log.info("received: {}", message);
Expand Down
2 changes: 1 addition & 1 deletion pulsar/src/test/java/com/example/InMemoryProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public Map<String, String> getConfigOverrides() {
"quarkus.pulsar.devservices.enabled", "false",
"mp.messaging.outgoing.send.connector","smallrye-in-memory",
"mp.messaging.incoming.messages.connector","smallrye-in-memory",
"mp.messaging.outgoing.data-stream.connector","smallrye-in-memory"
"mp.messaging.outgoing.data-result.connector","smallrye-in-memory"
// "pulsar.client.serviceUrl", "",
// "pulsar.admin.serviceUrl", ""
);
Expand Down
11 changes: 6 additions & 5 deletions pulsar/src/test/java/com/example/MessageHandlerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ class MessageHandlerTest {
@BeforeEach
void setUp() {
final Iterable<String> propertyNames = config.getPropertyNames();
for (final String propertyName : propertyNames) {
final String propertyValue = config.getValue(propertyName, String.class);
log.debug(propertyName + " = " + propertyValue);
}
log.debug("properties: {}", propertyNames);
// for (final String propertyName : propertyNames) {
// final String propertyValue = config.getValue(propertyName, String.class);
// log.debug(propertyName + " = " + propertyValue);
// }
}

@Test
void receive() {
InMemorySource<String> messages = connector.source("messages");
InMemorySink<String> sink = connector.sink("send");
InMemorySink<Message> dataStream = connector.sink("data-stream");
InMemorySink<Message> dataStream = connector.sink("data-result");

handler.send("hello");
await().atMost(Duration.ofMillis(1000)).untilAsserted(() ->
Expand Down

0 comments on commit c711057

Please sign in to comment.