Interface NtfyRuntimeConfig
quarkus.ntfy.* config namespace.
Declared as a ConfigMapping interface (the Quarkus 3.37 idiom — the legacy
@ConfigItem field style may not be mixed with mappings in the same module) and marked ConfigPhase.RUN_TIME so every value — including the endpoint url/topic and the
credentials — is read when the application starts, never baked into the build. This is what keeps
the extension native-image-safe: no HTTP client or thread is created at build/static-init time.
Durations are surfaced as raw Strings and parsed via DurationParser in the
recorder/producer, so the flexible ntfy spellings ("5s", "3m", "500",
"PT5S") all work rather than being constrained to Quarkus' own duration converter.
-
Method Summary
Modifier and TypeMethodDescriptionactions()Action buttons as a raw ntfyActionsheader value (short format, e.g.appName()Application name, used as the title base whentitle()is unset.booleanasync()Asynchronous (offloaded) delivery: individual error alerts are handed to the engine's bounded work queue and published by a daemon worker, so a slow/unreachable ntfy server never blocks the logging thread.intBounded async delivery queue capacity; only consulted whenasync()istrue.booleancache()falseasks the server not to store the message (Cache: no).clickUrl()URL opened when a notification is tapped (ntfyClickheader).HTTP connect timeout (ntfy duration spelling, e.g.ntfy priority header for the periodic storm digest.ntfy tags header for the periodic storm digest.booleanenabled()Master switch; whenfalsethe handler is never installed.ntfy priority header for individual error alerts.ntfy tags header for individual error alerts.Comma-separated fully qualified exception class names.Comma-separated logger-name prefixes excluded from alerting.booleanfirebase()falseasks the server not to forward the message to Firebase (Firebase: no).icon()URL of the icon shown beside the notification (ntfyIconheader).Per-logger icon overrides asprefix=urlpairs separated by commas.Comma-separated allow-list of MDC keys whose values are rendered into alert bodies, onekey: valueline each, in the order given here.locale()Language of notification bodies and diagnostics as a BCP 47 tag (e.g.intMaximum individually-published alerts per suppression window before digesting kicks in.intMaximum root-cause stack frames rendered into an alert body.password()Basic-auth password.HTTP request timeout (ntfy duration spelling, e.g.booleanStrict mode: refuse engine activation (rather than only warn) when credentials would be sent over a cleartexthttp://endpoint.Opt-in startup self-test:off(default),probe(read-only reachability check that publishes nothing) orpublish(a real low-priority test notification).booleanWhether a failed startup self-test aborts application startup instead of only warning.booleanWhether a failed self-test is announced as a notification on a route that PASSED.Startup self-test for the optional WARN route:off(default),probeorpublish.Storm-suppression window (ntfy duration spelling, e.g.title()Fixed notification title; falls back toappName()when unset.token()Bearer/access token (ntfytk_...); takes precedence over username/password.topic()Topic to publish to.url()Base URL of the ntfy server, e.g.username()Basic-auth username (used withpassword()when notoken()is set).ntfy priority header for WARN alerts and the WARN digest.warnTags()ntfy tags header for WARN alerts and the WARN digest.The ntfy topic WARN-level events are published to.
-
Method Details
-
url
Base URL of the ntfy server, e.g.https://ntfy.sh. Alerting is inactive when unset. -
topic
Topic to publish to. Alerting is inactive when unset. -
token
Bearer/access token (ntfytk_...); takes precedence over username/password. -
username
Basic-auth username (used withpassword()when notoken()is set). -
password
Basic-auth password. -
title
Fixed notification title; falls back toappName()when unset. -
appName
Application name, used as the title base whentitle()is unset. -
maxStackFrames
@WithDefault("5") int maxStackFrames()Maximum root-cause stack frames rendered into an alert body. -
connectTimeout
HTTP connect timeout (ntfy duration spelling, e.g.5s). -
requestTimeout
HTTP request timeout (ntfy duration spelling, e.g.10s). -
maxAlertsPerWindow
@WithDefault("3") int maxAlertsPerWindow()Maximum individually-published alerts per suppression window before digesting kicks in. -
suppressionWindow
Storm-suppression window (ntfy duration spelling, e.g.3m). -
errorPriority
ntfy priority header for individual error alerts. -
digestPriority
ntfy priority header for the periodic storm digest. -
errorTags
ntfy tags header for individual error alerts. -
digestTags
ntfy tags header for the periodic storm digest. -
warnTopic
The ntfy topic WARN-level events are published to. Unset by default, which keeps alerting ERROR-only; a non-blank value is the entire opt-in for WARN alerting. Set it to the same value asquarkus.ntfy.topicto alert on warnings through the main topic at a different priority. -
warnPriority
ntfy priority header for WARN alerts and the WARN digest. -
warnTags
ntfy tags header for WARN alerts and the WARN digest. -
clickUrl
URL opened when a notification is tapped (ntfyClickheader). Omitted when unset. -
actions
Action buttons as a raw ntfyActionsheader value (short format, e.g."view, View logs, https://grafana.example.com/d/abc"). Omitted when unset. -
excludedLoggers
Comma-separated logger-name prefixes excluded from alerting. -
excludedExceptionTypes
Comma-separated fully qualified exception class names. An event whose cause chain contains any of them never alerts — matched anywhere in the chain, not just on the surface throwable. -
cache
@WithDefault("true") boolean cache()falseasks the server not to store the message (Cache: no). Subscribers who are offline at that moment never receive it. Defaulttrue. -
firebase
@WithDefault("true") boolean firebase()falseasks the server not to forward the message to Firebase (Firebase: no). Defaulttrue. -
icon
URL of the icon shown beside the notification (ntfyIconheader). Must be anhttp/httpsURL; a value that is not one is dropped — reported at startup on the alerting path, silently by the injectableNtfyClient, which has no diagnostics channel. ntfy renders JPEG and PNG only, but that is a property of the bytes served, not of the path, so a URL whose extension names another format is warned about and still sent. -
iconsByLogger
Per-logger icon overrides asprefix=urlpairs separated by commas. The longest prefix matching an alert's logger wins; anything unmatched keeps the default icon. Alerts only — a notification has no logger to match on. -
includeMdcKeys
Comma-separated allow-list of MDC keys whose values are rendered into alert bodies, onekey: valueline each, in the order given here.Empty by default: unless an operator names a key, no MDC value ever leaves the application. There is deliberately no wildcard form — an MDC routinely holds session tokens, user identifiers and other data that must not be pushed to a notification server, so the only way to publish a value is to name its key explicitly. Unknown keys and keys absent from a given record are simply skipped.
Values are read from the JBoss LogManager MDC that Quarkus already funnels every log record through, so the usual
org.jboss.logmanager.MDC/org.slf4j.MDCwrites are picked up with no further wiring. -
locale
Language of notification bodies and diagnostics as a BCP 47 tag (e.g.fr,de-DE). Defaults to English when unset; an unknown/unshipped locale silently uses English. -
enabled
@WithDefault("true") boolean enabled()Master switch; whenfalsethe handler is never installed. -
async
@WithDefault("true") boolean async()Asynchronous (offloaded) delivery: individual error alerts are handed to the engine's bounded work queue and published by a daemon worker, so a slow/unreachable ntfy server never blocks the logging thread. On by default; setfalsefor pre-2.0 synchronous delivery. -
asyncQueueCapacity
@WithDefault("1024") int asyncQueueCapacity()Bounded async delivery queue capacity; only consulted whenasync()istrue. -
requireHttpsForCredentials
@WithDefault("true") boolean requireHttpsForCredentials()Strict mode: refuse engine activation (rather than only warn) when credentials would be sent over a cleartexthttp://endpoint. On by default; setfalsefor the pre-2.0 warn-and-activate behavior. -
startupPing
Opt-in startup self-test:off(default),probe(read-only reachability check that publishes nothing) orpublish(a real low-priority test notification). Verifies at boot that the configured endpoint, credentials and topic actually work, instead of finding out when the first real error alert fails to deliver.Typed
Stringrather than theStartupPingModeenum deliberately: SmallRye Config fails the whole application on an unconvertible enum value, so a single typo inapplication.propertieswould take the service down. The core parses it leniently and warns instead, which is also what the other five surfaces do. -
startupPingFailFast
@WithDefault("false") boolean startupPingFailFast()Whether a failed startup self-test aborts application startup instead of only warning. Off by default; enabling it also makes the self-test run inline, adding at most connect+request timeout to boot. Intended for CI/staging rather than production. -
startupPingWarn
Startup self-test for the optional WARN route:off(default),probeorpublish. Independent ofstartupPing()— ntfy grants permissions per topic, so a healthy ERROR route proves nothing about the WARN one. -
startupPingNotifyFailures
@WithDefault("true") boolean startupPingNotifyFailures()Whether a failed self-test is announced as a notification on a route that PASSED. On by default; it can never fire unless some route passed, so it cannot publish to a topic the self-test has not just verified.
-