merajblueshift opened a new issue #9441:
URL: https://github.com/apache/pulsar/issues/9441


   **Describe the bug**
   When creating a subscription using REST API on an existing topic having a 
good flow of messages, the cursor is set to the earliest position and if the 
same is done via pulsar-admin it sets the cursor correctly.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Create a topic having messages flowing in continuously and create a 
consumer for it.
   2. Let some messages get accumulated.
   3. Create a new subscription via REST API using this REST API
       ```
       curl -X PUT -L 
http://<pulsar_url>:8080/admin/v2/persistent/<tenant>/<namespace>/<topic>/subscription/<subscription_name>_rest_api
 -H 'Content-Type: application/json' -d '{
     "messageId": "latest"
   }'
       ```
   4. Also create a subscription using Admin API
       ```
       pulsar-admin topics create-subscription -m latest -s 
<subscription_name>_admin_api persistent://<tenant>/<namespace>/<topic>
       ```
   
   **Expected behavior**
   The subscription created via REST API should also have the cursor set on the 
latest.
   
   **Screenshots**
   Both subscription_adminApi and subscription_restApi were created at the same 
time. See the difference in backlog.
   <img width="1637" alt="Screenshot 2021-02-03 at 10 08 33 AM" 
src="https://user-images.githubusercontent.com/58764022/106698934-da683a00-6607-11eb-985e-3ec1d10fefba.png";>
   
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to