Databases and Business podcast

Subscribe to podcast via: spotify| iTunes| RSS

The #124 episode with Ben Brumm (@databasestar) about:
databases, business analysts, database tools, database development and the object-relational impedance mismatch
is available for

Quarkus, Kafka, java.lang.IllegalStateException: SRMSG00028 and the Solution

The following exception:

java.lang.IllegalStateException: SRMSG00028: The subscription to ... has been cancelled
at io.smallrye.reactive.messaging.extension.AbstractEmitter.verify(
at io.smallrye.reactive.messaging.extension.AbstractEmitter.emit(
at io.smallrye.reactive.messaging.extension.EmitterImpl.send(
at airhacks.kafka.jaxrs.boundary.MessagesResource.send(
at airhacks.kafka.jaxrs.boundary.MessagesResource_Subclass.send$$superaccessor1(MessagesResource_Subclass.zig:209)
at airhacks.kafka.jaxrs.boundary.MessagesResource_Subclass$$function$$3.apply(MessagesResource_Subclass$$function$$3.zig:33)    

is caused by an injected Emitter into a RequestScoped managed bean:

import javax.annotation.PreDestroy;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;

import org.eclipse.microprofile.reactive.messaging.Channel;
import org.eclipse.microprofile.reactive.messaging.Emitter;

public class MessagesResource {

    Emitter<String> messageEmitter;
    public void send(String message) {

    public void closeStream(){

Changing the scope to ApplicationScoped solves the problem:

public class MessagesResource{

Example was tested with: and configured SmallRye Apache Kafka connector (mp.messaging.outgoing.messages.connector=smallrye-kafka).

An offline JavaDoc search PWA is a useful documentation / API search Progressive Web App (PWA) with offline search capabilities. is not only usable as a search utility for Web Components or webstandards APIs, also Java 11 javadoc is available for offline search:

Converting a byte[] to Stream

The following snippet converts a byte[] array to a Stream using ByteBuffer:

import java.nio.ByteBuffer;

import org.junit.jupiter.api.Test;

public class ByteArrayTest {
    public void byteArrayToStream(){
        byte bytes[] = new byte[]{0xC,0xA,0xF,0xE,0xB,0xA,0xB,0xE};
        var buffer = ByteBuffer.wrap(bytes);
        var message = Stream.generate(() -> buffer.get()).
                        map(b -> Integer.toHexString(b)).

Output: cafebabe

Plasma is the new "Hello,World" podcast

Subscribe to podcast via: spotify| iTunes| RSS

The #123 episode with Bert Jan Schrijver (@bjschrijver) about:
AI, Java EE, Java, serverless, Quarkus, and a bit of plasma
is available for

Avoiding Port Collisions by Launching Multiple Quarkus Instances in DEV Mode

Quarkus started in development (quarkus:dev) mode with a JAX-RS endpoint exposed, opens two ports: (http) 8080 and (debug) 5005 per default.

You will have to assign distinct ports for every new launched instance. The http port is configurable in the quarkus.http.port=8282 or environment entries (not suitable for our purpose), the debug port can be changed (-Ddebug=6000) or deactivated from the command line only: mvn compile -Ddebug=false quarkus:dev

Early 2021 Java, Web, Architecture Events, Conferences And Workshops

  1. WeAreDevelopers conference: 2021: Familiar APIs on Kickass Runtimes #slideless [online event]
    conference session 20 Jan 2021
  2. #83rd Questions and Answers [online event]
    live questions and answers show 8 Feb 2021
  3. JavaLand conference: Timesaving Metrics - In The Clouds #slideless [online event]
    conference session 16 Mar 2021
  4. Monoliths, Microservices, Serverless, Event-Driven,(...) Architectural Styles [online event]
    live, interactive, virtual workshop 16 Mar 2021
  5. Building Event-Driven Applications with Streams, Logs and Messages [online event]
    live, interactive, virtual workshop 23 Mar 2021
  6. Best Practices, Hacks and Frontend Patterns with Vanilla Web Components, redux and lit-html [online event]
    live, interactive, virtual workshop 15 Apr 2021
  7. Building Mobile Apps with Vanilla Web Components, redux and lit-html [online event]
    live, interactive, virtual workshop 6 May 2021 Java 14 to Java 15 Update and MP REST Client CXF to RESTEasy Migration

Update from Java 14 with --enable-preview to Java 15, fixing Apache CXFs:

java.lang.IllegalAccessError: class org.apache.cxf.microprofile.client.MicroProfileClientProviderFactory$$Lambda$345/0x0000000800c309b0 tried to access protected method 'int org.apache.cxf.jaxrs.provider.ProviderFactory.compareCustomStatus(org.apache.cxf.jaxrs.model.ProviderInfo, org.apache.cxf.jaxrs.model.ProviderInfo)' (org.apache.cxf.microprofile.client.MicroProfileClientProviderFactory$$Lambda$345/0x0000000800c309b0 and org.apache.cxf.jaxrs.provider.ProviderFactory are in unnamed module of loader 'app'

by switching from cxf-rt-rs-mp-client to resteasy-client-microprofile.

A free bonus video from the video course:

Also checkout the corresponding repository:

Java CLI Apps, Builds and podcast

Subscribe to podcast via: spotify| iTunes| RSS

The #122 episode with Max Rydahl Andersen (@maxandersen) about:
creating Java Command Line Applications with and without jbang, new ways to launch and build Java applications with minimal requirements, how jbang happened, combining quarkus and jbang, and building serverless applications with quarkus and jbang
is available for The Feel of Next Generation Java Cloud Native Runtimes

Building a Java backend service with familiar APIs on a next generation runtime:

Online Workshops
...the last 150 posts
...the last 10 comments