question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add a switch to disable @Incoming just like @Scheduled myMethod.cron.expr=disabled

See original GitHub issue

Description

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:closed
  • Created 2 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ozangunalpcommented, Aug 10, 2021

@Dieken can you give it a try and tell us if it works you’d expect?

2reactions
ozangunalpcommented, Aug 10, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found