Skip to content

Commit

Permalink
Remove named PU
Browse files Browse the repository at this point in the history
  • Loading branch information
ozangunalp committed Nov 23, 2022
1 parent fe34d67 commit 5e7bb76
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import org.apache.kafka.common.TopicPartition;

import io.quarkus.hibernate.orm.PersistenceUnit;
import io.quarkus.smallrye.reactivemessaging.kafka.CheckpointEntityId;

@Path("/kafka")
Expand All @@ -21,7 +20,6 @@ public class KafkaEndpoint {
KafkaReceivers receivers;

@Inject
@PersistenceUnit("people")
EntityManager entityManager;

@GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public class KafkaReceivers {

@Incoming("fruits-in")
@Transactional
public void persist(Fruit fruit) {
fruit.persist();
emitter.sendAndAwait(fruit);
public CompletionStage<Void> persist(Message<Fruit> fruit) {
fruit.getPayload().persist();
return emitter.sendMessage(fruit).subscribeAsCompletionStage();
}

@Incoming("people-in")
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ mp.messaging.incoming.people-in.topic=people
mp.messaging.incoming.people-in.commit-strategy=checkpoint
mp.messaging.incoming.people-in.checkpoint.state-store=quarkus-hibernate-orm
mp.messaging.incoming.people-in.checkpoint.state-type=io.quarkus.it.kafka.PeopleState
mp.messaging.incoming.people-in.checkpoint.quarkus-hibernate-orm.persistence-unit=people
#mp.messaging.incoming.people-in.checkpoint.quarkus-hibernate-orm.persistence-unit=people
mp.messaging.incoming.people-in.auto.commit.interval.ms=500
mp.messaging.incoming.people-in.group.id=people-checkpoint

quarkus.datasource."people".devservices.enabled=true
quarkus.hibernate-orm."people".datasource=people
#quarkus.datasource."people".devservices.enabled=true
#quarkus.hibernate-orm."people".datasource=people

0 comments on commit 5e7bb76

Please sign in to comment.