You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/05 00:11:11 UTC

[GitHub] [pulsar] zbentley opened a new issue #14563: Calling "peek" on a subscription with an offset of 0 results in a stacktrace

zbentley opened a new issue #14563:
URL: https://github.com/apache/pulsar/issues/14563


   **Describe the bug**
   Calling "peek" on a subscription with an offset of 0 results in a stacktrace
   
   **To Reproduce**
   1. Create a non-partitioned topic.
   2. Publish at least one message to it.
   3. Create a subscription on it.
   4. Using the management API, do `$topic/subscription/$subscription/position/0`
   
   **Expected behavior**
   A documented error code and message are returned to the user, indicating "zero is not a valid offset".
   
   **Actual behavior**
   A stacktrace and 500 error are returned.
   
   Pulsar 2.9.1 on MacOS.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zbentley commented on issue #14563: Calling "peek" on a subscription with an offset of 0 results in a stacktrace

Posted by GitBox <gi...@apache.org>.
zbentley commented on issue #14563:
URL: https://github.com/apache/pulsar/issues/14563#issuecomment-1059873077


   The same (or very similar) behavior occurs if I perform a `peek` on a topic with a ledger ID that does not exist.
   
   Either a 404 or something else obvious should be raised here, not a stacktrace.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #14563: Calling "peek" on a subscription with an offset of 0 results in a stacktrace

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #14563:
URL: https://github.com/apache/pulsar/issues/14563#issuecomment-1060781753


   @zbentley It needs to create the subscription first, and then publish messages, to peek messages. The new subscription in Pulsar will use the latest position as the initial read position, so if you create the subscription after the message is published, the subscription will not have any backlogs, so you will not able to peek any messages from the subscription.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org