Skip to content

Commit

Permalink
Upd warning text
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldygg committed Nov 8, 2024
1 parent c167280 commit cf1eddc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions faststream/nats/subscriber/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,28 +356,28 @@ def _validate_input_for_misconfigure(
if not stream:
if idle_heartbeat is not None:
warnings.warn(
"`idle_heartbeat` is not usable for Core Subscription. It can be used with JetStream (Pull/Push) - only.",
"`idle_heartbeat` has no effect for Core subscriber. It can be used with JetStream (Pull/Push) - only.",
RuntimeWarning,
stacklevel=4,
)

if flow_control is not None:
warnings.warn(
"`flow_control` is not usable for Core Subscription. It can be used with JetStream (Pull/Push) - only.",
"`flow_control` has no effect for Core subscriber. It can be used with JetStream (Pull/Push) - only.",
RuntimeWarning,
stacklevel=4,
)

if deliver_policy is not None:
warnings.warn(
"`deliver_policy` is not usable for Core Subscription. It can be used with JetStream (Pull/Push) - only.",
"`deliver_policy` has no effect for Core subscriber. It can be used with JetStream (Pull/Push) - only.",
RuntimeWarning,
stacklevel=4,
)

if headers_only is not None:
warnings.warn(
"`headers_only` is not usable for Core Subscription. It can be used with JetStream (Pull/Push) - only.",
"`headers_only` has no effect for Core subscriber. It can be used with JetStream (Pull/Push) - only.",
RuntimeWarning,
stacklevel=4,
)
Expand Down

0 comments on commit cf1eddc

Please sign in to comment.