Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consumer resume does not unpause the consumer #5163

Closed
MauriceVanVeen opened this issue Mar 2, 2024 · 0 comments · Fixed by #5164
Closed

Consumer resume does not unpause the consumer #5163

MauriceVanVeen opened this issue Mar 2, 2024 · 0 comments · Fixed by #5164
Labels
defect Suspected defect such as a bug or regression

Comments

@MauriceVanVeen
Copy link
Member

Observed behavior

When calling nats consumer resume it returns that the consumer is unpaused, but calling the consumer info indicates the consumer is still paused.

Expected behavior

When calling nats consumer resume the consumer should be unpaused, and the consumer info should reflect that.

Server and client version

  • natscli @ main
  • nats-server @ main / 2.11.0-dev

Host environment

No response

Steps to reproduce

  1. Add stream: nats str add stream --subjects stream --defaults
  2. Add consumer: nats con add stream consumer --pull --defaults
  3. Consumer info, should not be paused: nats con info stream consumer -j
  4. Pause consumer: nats con pause stream consumer 7d -f
  5. Consumer info, should be paused: nats con info stream consumer -j
{
  "stream_name": "stream",
  "name": "consumer",
  "config": {
    ...
    "pause_until": "2024-03-09T15:47:17.897365637Z"
  },
  "created": "2024-03-02T15:47:15.718156438Z",
   ...
  "paused": true,
  "pause_remaining": 604778793202318,
  "ts": "2024-03-02T15:47:39.104162517Z"
}
  1. Resume consumer: nats con resume stream consumer -f

CLI logs:

Consumer stream > consumer was resumed while previously paused until 2024-03-09 16:47:17

But, when requesting the consumer info again, it is not resumed.

@MauriceVanVeen MauriceVanVeen added the defect Suspected defect such as a bug or regression label Mar 2, 2024
derekcollison added a commit that referenced this issue Mar 2, 2024
Fixes #5163, by setting the
`PauseUntil` to `nil` if it was a zero-value.

This fixes the CLI `nats consumer resume` command, which is sending an
empty/nil body to `$JS.API.CONSUMER.PAUSE.*.*`.

Allowing for both sending an empty/nil body as well as omitting
`pause_until` (for example with just `{}`)

Signed-off-by: Maurice van Veen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant