You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/05/29 14:56:15 UTC

[GitHub] [pulsar-client-node] goku321 opened a new issue #92: Creating a subscription with initial position as "earliest"

goku321 opened a new issue #92:
URL: https://github.com/apache/pulsar-client-node/issues/92


   My use case: I have a shared subscription with a bunch of consumers. Suppose, all the consumers die and there are messages still being published to the topic. When a new consumer comes in, I want it to read from the last unacknowledged message so that no messages are lost or unprocessed.
    
   So, I want to create a subscription with initial subscription position as `earliest` but I don't see any option to set the initial position. Also, What is default behavior? `earliest` or `latest ?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-node] goku321 edited a comment on issue #92: Creating a subscription with initial position as "earliest"

Posted by GitBox <gi...@apache.org>.
goku321 edited a comment on issue #92:
URL: https://github.com/apache/pulsar-client-node/issues/92#issuecomment-638163153


   @equanz What if the topic had messages even before creating the subscription? I don't think subscription will read the old messages by default.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-node] equanz commented on issue #92: Creating a subscription with initial position as "earliest"

Posted by GitBox <gi...@apache.org>.
equanz commented on issue #92:
URL: https://github.com/apache/pulsar-client-node/issues/92#issuecomment-638040825


   Since subscription hold cursor(position of acked message) and cursor move forward when consumer send acknowledge, I think new consumer just reconnect your shared subscription. 
   
   More detail, please see below.
   https://pulsar.apache.org/docs/en/concepts-messaging/#shared


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-node] goku321 commented on issue #92: Creating a subscription with initial position as "earliest"

Posted by GitBox <gi...@apache.org>.
goku321 commented on issue #92:
URL: https://github.com/apache/pulsar-client-node/issues/92#issuecomment-638163153


   @equanz What if there were messages even before creating the subscription? I don't think subscription will read the old messages by defaultl


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-node] equanz commented on issue #92: Creating a subscription with initial position as "earliest"

Posted by GitBox <gi...@apache.org>.
equanz commented on issue #92:
URL: https://github.com/apache/pulsar-client-node/issues/92#issuecomment-638692574


   I see. In your use case, create new subscription when a new consumer comes in, right?
   If so, I think new subscription use `earliest` position and don't process processed message by consumer side.
   
   `earliest` can set initial subscription position to 'never deleted' message. However, 'never deleted' message is not always corresponding to unacked message correctly.
   
   If you don't implement this process, I think you should reuse 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.

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