@Inject
SomeService someService; // has transactional method and EntityManager injected
@Incoming("some-topic")
processMessage(ReceivedKafkaMessage<String, byte[]> input){
someService.processData(input.getPayload); // process and save data to DB
input.ack();
}io.quarkus.hibernate.orm.runtime.entitymanager.TransactionScopedEntityManager now contains checkBlocking() method, which leads to following exception in our code:
You have attempted to perform a blocking operation on a IO thread. This is not allowed, as blocking the IO thread will cause major performance issues with your application. If you want to perform blocking EntityManager operations make sure you are doing it from a worker thread.: java.lang.IllegalStateException: You have attempted to perform a blocking operation on a IO thread. This is not allowed, as blocking the IO thread will cause major performance issues with your application. If you want to perform blocking EntityManager operations make sure you are doing it from a worker thread.
I also found that algorithm, which detects is current thread is IOThread or not, was changed in master after 0.23, so, basically I have 2 questions:
1. Is thread, which handle @Incoming in our code, will still detected as "IOThread" after alorithm change will be released?
2. If so, how should we handle messages from Kafka, if we really need "synchronous" processing here, from message receiving till acknowledgment via JPA operations?
Thanks
--
Sergey
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/a437ca9b-a37c-43e9-9608-94b38860b604%40googlegroups.com.
@Incoming("ordini")
public void updateDevices(String deviceKeyJson) {
}
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAD1V%3DtQQDVBJzEqfJ2DZDMNt%2Bi-8uW1krE0nG9Vu4UhkHMy9rA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAG%3D-wFOn52GffuzaXfHiGDmEYG0YSfBWAzzQv2EW58FzpVP%3DfQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAAoo%3Dc5WTc8NGK17TDSQJ%2BKN4iF92mPzr0WOSb8ttKp8KXG5RQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAKU9E9sNAK8VBkBReavETVT_ag_rqK3EUn0FuP%2BpkDh76MWNyQ%40mail.gmail.com.
Hi Clement,
Is the " Blocking" operation now supported?
Where can I track that work?
Cheers
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/974DBC5D-9F05-4BF0-A480-61C1D44B72D2%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/b5080529-abf7-7a82-8ca8-bca1ba3d3b52%40gmail.com.
Hello,I've created a quickstart to demonstrate the feature:Clement
Clement
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/a437ca9b-a37c-43e9-9608-94b38860b604%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/974DBC5D-9F05-4BF0-A480-61C1D44B72D2%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
Thanks very much Clement!
The config is a bit thin. What will be the default config when
you use the stock @Blocking?
How many concurrent requests will handled simultaneously, by default?
Cheers
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAKW6fidrRO0dTUno%2BDho6YJdPe9ZNNx%2Bin%3D8PFijQj2_M7mQ6Q%40mail.gmail.com.
/**
* The size of the worker thread pool.
*/
@ConfigItem(defaultValue = "20")
public int workerPoolSize;
But, it can be configured.
Clement
| Paul |
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAKW6fif6cuHw%2BXJMbdO%3DML1czmoZLY-dScMw3Cm9od8sfVm1Hw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAKW6fif6cuHw%2BXJMbdO%3DML1czmoZLY-dScMw3Cm9od8sfVm1Hw%40mail.gmail.com.