Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Updated Quarkus stack to use Quarkus 1.6.0.Final (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobinson authored Jul 13, 2020
1 parent 69072e1 commit e9e90a9
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion incubator/quarkus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
6 changes: 3 additions & 3 deletions incubator/quarkus/image/project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

<groupId>dev.appsody</groupId>
<artifactId>quarkus</artifactId>
<version>0.4.0</version>
<version>0.5.0</version>
<packaging>pom</packaging>

<properties>
<quarkus-plugin.version>1.5.0.Final</quarkus-plugin.version>
<quarkus-plugin.version>1.6.0.Final</quarkus-plugin.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>1.5.0.Final</quarkus.platform.version>
<quarkus.platform.version>1.6.0.Final</quarkus.platform.version>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<surefire-plugin.version>2.22.1</surefire-plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion incubator/quarkus/stack.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion incubator/quarkus/templates/default/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>dev.appsody</groupId>
<artifactId>quarkus</artifactId>
<version>[0.4,0.5)</version>
<version>[0.5,0.6)</version>
</parent>

<groupId>org.acme</groupId>
Expand Down
2 changes: 1 addition & 1 deletion incubator/quarkus/templates/kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.appsody</groupId>
<artifactId>quarkus</artifactId>
<version>[0.4,0.5)</version>
<version>[0.5,0.6)</version>
</parent>

<groupId>org.acme</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -19,8 +21,9 @@ public class PriceGenerator {
private Random random = new Random();

@Outgoing("generated-price")
public Flowable<Integer> generate() {
return Flowable.interval(5, TimeUnit.SECONDS)
public Multi<Integer> generate() {
return Multi.createFrom().ticks().every(Duration.ofSeconds(5))
.onOverflow().drop()
.map(tick -> random.nextInt(100));
}

Expand Down

0 comments on commit e9e90a9

Please sign in to comment.