add a switch to disable @Incoming just like @Scheduled myMethod.cron.expr=disabled
See original GitHub issueDescription
This is to seek a specific solution for https://github.com/quarkusio/quarkus/issues/19278.
I have a simple Quarkus app that includes both HTTP API and Kafka consumer, I would like to run a HTTP API only version and a fully version in my K8S cluster. Because the code base is very small, I don’t want to separate code into three jars: common service jar + http resource jar + kafka consumer jar. Because I don’t hope the Kafka consuming issue affects HTTP API service performance and stability, I want that HTTP API only version.
So I want a switch to disable @Incoming
:
@ApplicationScoped
public class MyConsumer {
@Incoming("topicA")
public void consume(Xxx x) {
}
}
application.properties:
mp.messaging.incoming.topicA.disabled=true # currently Quarkus doesn't support this config property
Implementation ideas
Add a new runtime config property like mp.messaging.incoming.[TOPIC].disabled
with default value false
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
How to conditionally enable or disable scheduled jobs in ...
The most efficient way to disable @Scheduled in Spring is to set cron expression to - @Scheduled(cron = "-") public void autoEvictAllCache() ...
Read more >How to Disable the WP Cron - InMotion Hosting
WordPress uses wp-cron.php to automate things like scheduled posts, the default behavior can be intensive and we can disable it.
Read more >How To Disable eMail Alert By Crontab Command on Linux/Unix
Explains how to disable crontab email alert by using shell tricks or MAILTO variable under a UNIX / Linux / BSD operating systems....
Read more >Disable cron emails (solution) - Hayden James
Cron is a daemon that executes scheduled commands. More specifically, the software utility cron is a time-based job scheduler for Unix-like ...
Read more >How to Start, Stop, and Restart Cron Jobs - Airplane.dev
In this post, we'll take an in-depth look at what a cron job is, ... We'll also introduce Airplane schedules as a powerful...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Dieken can you give it a try and tell us if it works you’d expect?
Funny enough there already is an option to disable a channel with
mp.messaging.incoming|outgoing.<channel>.enabled=false
. It prevents the channel from being registered.