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

Reactive Messaging codestart (in java and kotlin) #20872

Closed
ia3andy opened this issue Oct 19, 2021 · 6 comments · Fixed by #21906
Closed

Reactive Messaging codestart (in java and kotlin) #20872

ia3andy opened this issue Oct 19, 2021 · 6 comments · Fixed by #21906

Comments

@ia3andy
Copy link
Contributor

ia3andy commented Oct 19, 2021

Description

Create a codestart for Reactive Messaging in java and kotlin

Implementation ideas

It's better to first discuss the content of the codestart here.

The goal is to have code:

  • that is re-used 90% of the time to get started with the extension (nearly no deletion, renaming is fine)
  • that is compatible with all other compatible extensions codestarts

What is the piece of code that you nearly always start with when using the extension.. Make it compile, and it's the perfect codestart!

The guide to create an extension codestart quarkus.io/guides/extension-codestart

@ia3andy ia3andy added the kind/enhancement New feature or request label Oct 19, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 19, 2021

/cc @cescoffier, @evanchooly, @michalszynkiewicz, @ozangunalp, @phillip-kruger, @quarkusio/devtools

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 19, 2021

@cescoffier suggested this:
(WARNING PSEUDO CODE - DO NOT COPY AND PASTE AND EXECUTE)

@ApplicationScoped
public class MyKafkaApplication {

    @Channel("my-kafka-topic") Emitter<String> emitter;

   /** Sends message to Kafka, can be used from a JAX-RS resource or  any bean of your application **/
  public void sendToKafka(String message) { emitter.send(message); }

 /** Consume from Kafka topic **/
@Incoming("from-kafka") void consume(String message) {
    Systme.out.println("Received: " + message);
}

}

@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 19, 2021

@loicmathieu suggested this: "I will also add a processor as it's very common and it will show the @Outgoing annotation."

@ozangunalp ozangunalp self-assigned this Oct 21, 2021
@vgallet
Copy link
Contributor

vgallet commented Oct 27, 2021

I'm taking care of it ;-)

@ia3andy ia3andy assigned vgallet and ozangunalp and unassigned ozangunalp Oct 27, 2021
@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 27, 2021

I am keeping @ozangunalp as reviewer/collaborator wdyt?

@ia3andy ia3andy assigned ozangunalp and vgallet and unassigned ozangunalp and vgallet Oct 27, 2021
@ia3andy
Copy link
Contributor Author

ia3andy commented Oct 27, 2021

ok sorry, I managed to add you both as assignee :) GH was acting weird..

vgallet added a commit to vgallet/quarkus that referenced this issue Oct 28, 2021
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
vgallet added a commit to vgallet/quarkus that referenced this issue Oct 28, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
vgallet added a commit to vgallet/quarkus that referenced this issue Oct 28, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
vgallet added a commit to vgallet/quarkus that referenced this issue Oct 31, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
 * created dynamic application.yml based on selected extension
vgallet added a commit to vgallet/quarkus that referenced this issue Nov 15, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
 * created dynamic application.yml based on selected extension
vgallet added a commit to vgallet/quarkus that referenced this issue Nov 16, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
 * created dynamic application.yml based on selected extension
 * added codestart integration test
vgallet added a commit to vgallet/quarkus that referenced this issue Nov 17, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
 * created dynamic application.yml based on selected extension
 * added codestart integration test
ia3andy pushed a commit to ia3andy/quarkus that referenced this issue Dec 2, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
 * created dynamic application.yml based on selected extension
 * added codestart integration test
ia3andy pushed a commit to ia3andy/quarkus that referenced this issue Dec 3, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
 * created dynamic application.yml based on selected extension
 * added codestart integration test
ia3andy pushed a commit to ia3andy/quarkus that referenced this issue Dec 3, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
 * created dynamic application.yml based on selected extension
 * added codestart integration test
ia3andy pushed a commit to ia3andy/quarkus that referenced this issue Dec 3, 2021
 * fix quarkusio#20872
 * created `MyReactiveMessagingApplication` to demonstrates `@Emitter`, `@Incoming` and `@Outgoing` annotations.
 * created dynamic application.yml based on selected extension
 * added codestart integration test
@quarkus-bot quarkus-bot bot added this to the 2.6 - main milestone Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment