diff --git a/incubator/quarkus/README.md b/incubator/quarkus/README.md
index 6c79ccebb..8107b9d4e 100644
--- a/incubator/quarkus/README.md
+++ b/incubator/quarkus/README.md
@@ -2,7 +2,7 @@
The Quarkus stack is designed to provide a foundation for building and running Java applications on Quarkus with Appsody.
-This stack is based on the `Quarkus 1.5.0.Final` runtime. It allows you to develop new or existing Java applications that run on Quarkus and can be turned into a native executable for a low memory footprint and near instantaneous (< 10ms) start times.
+This stack is based on the `Quarkus 1.6.0.Final` runtime. It allows you to develop new or existing Java applications that run on Quarkus and can be turned into a native executable for a low memory footprint and near instantaneous (< 10ms) start times.
## What is Quarkus?
diff --git a/incubator/quarkus/image/project/pom.xml b/incubator/quarkus/image/project/pom.xml
index 830e4ed5e..f7b8d72d8 100644
--- a/incubator/quarkus/image/project/pom.xml
+++ b/incubator/quarkus/image/project/pom.xml
@@ -4,14 +4,14 @@
dev.appsody
quarkus
- 0.4.0
+ 0.5.0
pom
- 1.5.0.Final
+ 1.6.0.Final
quarkus-bom
io.quarkus
- 1.5.0.Final
+ 1.6.0.Final
3.8.1
2.22.1
UTF-8
diff --git a/incubator/quarkus/stack.yaml b/incubator/quarkus/stack.yaml
index df4faf6f6..fd3659a37 100644
--- a/incubator/quarkus/stack.yaml
+++ b/incubator/quarkus/stack.yaml
@@ -1,5 +1,5 @@
name: Quarkus
-version: 0.4.0
+version: 0.5.0
description: Quarkus runtime for running Java applications
license: Apache-2.0
language: java
diff --git a/incubator/quarkus/templates/default/pom.xml b/incubator/quarkus/templates/default/pom.xml
index 44a4f1773..539dac60c 100644
--- a/incubator/quarkus/templates/default/pom.xml
+++ b/incubator/quarkus/templates/default/pom.xml
@@ -5,7 +5,7 @@
dev.appsody
quarkus
- [0.4,0.5)
+ [0.5,0.6)
org.acme
diff --git a/incubator/quarkus/templates/kafka/pom.xml b/incubator/quarkus/templates/kafka/pom.xml
index cbbdceecf..af9a10c63 100644
--- a/incubator/quarkus/templates/kafka/pom.xml
+++ b/incubator/quarkus/templates/kafka/pom.xml
@@ -6,7 +6,7 @@
dev.appsody
quarkus
- [0.4,0.5)
+ [0.5,0.6)
org.acme
diff --git a/incubator/quarkus/templates/kafka/src/main/java/org/acme/kafka/PriceConverter.java b/incubator/quarkus/templates/kafka/src/main/java/org/acme/kafka/PriceConverter.java
index dc87c69f5..c215e55dd 100644
--- a/incubator/quarkus/templates/kafka/src/main/java/org/acme/kafka/PriceConverter.java
+++ b/incubator/quarkus/templates/kafka/src/main/java/org/acme/kafka/PriceConverter.java
@@ -2,6 +2,7 @@
import javax.enterprise.context.ApplicationScoped;
+import org.eclipse.microprofile.reactive.messaging.Acknowledgment;
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.eclipse.microprofile.reactive.messaging.Outgoing;
@@ -16,9 +17,13 @@ public class PriceConverter {
private static final double CONVERSION_RATE = 0.88;
+ // Consume from the `prices` channel and produce to the `my-data-stream` channel
@Incoming("prices")
@Outgoing("my-data-stream")
+ // Send to all subscribers
@Broadcast
+ // Acknowledge the messages before calling this method.
+ @Acknowledgment(Acknowledgment.Strategy.PRE_PROCESSING)
public double process(int priceInUsd) {
return priceInUsd * CONVERSION_RATE;
}
diff --git a/incubator/quarkus/templates/kafka/src/main/java/org/acme/kafka/PriceGenerator.java b/incubator/quarkus/templates/kafka/src/main/java/org/acme/kafka/PriceGenerator.java
index b1f38bab5..3d848d19b 100644
--- a/incubator/quarkus/templates/kafka/src/main/java/org/acme/kafka/PriceGenerator.java
+++ b/incubator/quarkus/templates/kafka/src/main/java/org/acme/kafka/PriceGenerator.java
@@ -1,10 +1,12 @@
package org.acme.kafka;
+import java.time.Duration;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import javax.enterprise.context.ApplicationScoped;
+import io.smallrye.mutiny.Multi;
import org.eclipse.microprofile.reactive.messaging.Outgoing;
import io.reactivex.Flowable;
@@ -19,8 +21,9 @@ public class PriceGenerator {
private Random random = new Random();
@Outgoing("generated-price")
- public Flowable generate() {
- return Flowable.interval(5, TimeUnit.SECONDS)
+ public Multi generate() {
+ return Multi.createFrom().ticks().every(Duration.ofSeconds(5))
+ .onOverflow().drop()
.map(tick -> random.nextInt(100));
}