Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Roberto Cortez
    @radcortez
    sec
    David M. Lloyd
    @dmlloyd
    thanks!
    I keep forgetting how it all works :)
    Roberto Cortez
    @radcortez
    no worries :)
    Roberto Cortez
    @radcortez
    done
    for reference:
    <settings>
      <servers>
        <server>
          <id>oss.sonatype</id>
          <username>CHANGE_ME</username>
          <password>CHANGE_ME</password>
        </server>
      </servers>
      <profiles>
        <profile>
          <id>ossrh</id>
          <activation>
            <activeByDefault>true</activeByDefault>
          </activation>
          <properties>
            <gpg.executable>gpg</gpg.executable>
            <gpg.passphrase>CHANGE_ME</gpg.passphrase>
            <gpg.keyname>CHANGE_ME</gpg.keyname>
          </properties>
        </profile>
      </profiles>
    </settings>
    David M. Lloyd
    @dmlloyd
    :+1:
    are you using a personal login for oss.sonatype or did you create an org one?
    Ken Finnigan
    @kenfinnigan
    SmallRye has a sonatype login
    Roberto Cortez
    @radcortez
    no, we have a org one
    do you need it for a SR project? you can use the same
    David M. Lloyd
    @dmlloyd
    it's for Qlue so it's not really a SR project
    I just want to replicate the process (it's a good process!)
    Roberto Cortez
    @radcortez
    ahah thanks :)
    well let me know if there is something to improve
    David M. Lloyd
    @dmlloyd
    well, so far this has been an exercise in frustration :)
    for now I'm going to deploy qlue through jboss nexus
    Ken Finnigan
    @kenfinnigan
    ouch
    Roberto Cortez
    @radcortez
    well let me know if I can help?
    where are you stuck?
    David M. Lloyd
    @dmlloyd
    first, trying to get it to use a different GPG key
    second I had a really bizarre problem with the javadoc plugin
    I figure a sensible first step is to be able to deploy to sonatype manually
    but I've only gotten 400 errors so far
    tbh I can't really spend hours and hours on this so I'm going to stick with what works
    assuming it actually works...
    Roberto Cortez
    @radcortez
    hum, maybe failing the nexus rules? there is a config in the staging plugin that keeps that log in nexus
    well, sure go ahead. I can have a look later
    David M. Lloyd
    @dmlloyd
    I have no idea if JBoss Nexus is still propagating io.quarkus to central... I think it is...
    miguel-figueiredo
    @miguel-figueiredo

    Hi,
    I am creating a Multi from a publisher and I am getting an error.

    Mutiny Code:

            final Multi<Object> multiPublisher = Multi.createFrom().publisher(s -> {
                s.onNext("Hello");
                s.onNext("Mutiny Publisher");
            });
    
            multiPublisher.subscribe().with(System.out::println);

    Exception:
    Caused by: java.lang.NullPointerException: Subscription not set!

    This is similar to what I would do with RxJava:

            Flowable<String> flowable = Flowable.fromPublisher(s -> {
                s.onNext("Hello");
                s.onNext("RxJava Flowable");
            });
    
            flowable.subscribe(System.out::println);

    Any hints?

    Clement Escoffier
    @cescoffier
    @miguel-figueiredo
    Hello, your publisher is not correct (violate the reactive streams protocol). You need to send a subscription before calling onNext and wait for downstream requests before calling onNext. I recommend you to use: Multi.createFrom().emitter(e -> …) which will makes shure this is done.
    miguel-figueiredo
    @miguel-figueiredo
    Yes I've tried with emitter and it works. Thanks :)
    wllianwd
    @wllianwd
    Hello, is it possible to define an openapi tag using property? Like mp.openapi.extensions.smallrye.tags[0].name=test?
    Phillip Krüger
    @phillip-kruger
    Hi @wllianwd - You can not do tags in config (at the moment) . See https://github.com/smallrye/smallrye-open-api/blob/68d05f0760f5eab9cd8023e9ae1ced4a611ca20d/core/src/main/java/io/smallrye/openapi/api/OpenApiConfig.java#L88 on what is currently possible. If this is something you would want, please open a issue, or even beter an PR !
    wllianwd
    @wllianwd
    Thanks @phillip-kruger I'll check it.
    Phillip Krüger
    @phillip-kruger
    Cool :)
    miguel-figueiredo
    @miguel-figueiredo

    Hi,
    I am mapping some RX Java code into Mutiny and I'm having some problems with grouping. In this example I am grouping employee names by rating into a multi map.
    RX Java

            Observable.fromArray(employees)
                .groupBy(employee -> employee.rating)
                .flatMapSingle(e -> e.toMultimap(key -> e.getKey(), employee -> employee.name))
                .subscribe(System.out::println);

    Mutiny

            Multi.createFrom().items(employees)
                .groupItems().by(employee -> employee.rating)
                .map(e -> e.collectItems().asMultiMap(key -> e.key(), employee -> employee.name))
                .flatMap(Uni::toMulti)
                .subscribe().with(System.out::println);

    The Mutiny version it's a bit weird. Any suggestions on how to improve this?

    Clement Escoffier
    @cescoffier
    instead of map, use onItem().transformToUniAndMerge
    so you can merge the map and flatmap
    Clement Escoffier
    @cescoffier
    Actually, what are you trying to achieve?
    because to accumulate your employees per rating, there are simpler approaches
    miguel-figueiredo
    @miguel-figueiredo
    This is just an exercise from a RX Java course that I am doing, and in the process I am performing the implementation in Mutiny.
    The ideia is to group a list of names per rating.
    Maybe you can point me to another way of doing this.
    Clement Escoffier
    @cescoffier

    Something like:

    Uni<Map<Double, List<Employee>> uni = Multi.createFrom().items(employees)
                    .collectItems().asMultiMap(e -> e.rating);

    Usupposing rating is a double.

    where are these exercices? I'm interested because we are redoing the Mutiny documentation and that the kind of thing we could add.
    miguel-figueiredo
    @miguel-figueiredo
    Thanks for the help! :)
    I am taking a RX Java course in Udemy: Functional & Reactive programming in Java
    They provide some code examples, and my personal exercise is to convert them to Mutiny.
    Clement Escoffier
    @cescoffier
    Nice! Thanks!
    miguel-figueiredo
    @miguel-figueiredo

    Hi,
    Sorry for being such a nag, but I was looking at the concepts of caching and replaying events in RX Java and although the caching is very similar in Mutiny, I couldn't find anything for the replay.
    Examples of replay in RX Java:

    final Observable<Long> source = Observable.interval(1, TimeUnit.SECONDS).replay().autoConnect();
    final Observable<Long> source = Observable.interval(1, TimeUnit.SECONDS).replay(5).autoConnect();
    final Observable<Long> source = Observable.interval(1, TimeUnit.SECONDS)
                .replay(2, 1, TimeUnit.SECONDS).autoConnect();

    Regarding hotstreams I also couldn't find a BehaviourProcessor where the subscriber can receive the last event.

    Clement Escoffier
    @cescoffier
    @miguel-figueiredo do you have a use case? We have broadcast ability but not replay as in the last 5 years I didn’t see a valid use case. We recomment to use broadcast with a minimum set of subscriber. The issue with replay is to find the “right” buffer size.