github.com/altipla-consulting/ravendb-go-client@v0.1.3/subscription_opening_strategy.go (about)

     1  package ravendb
     2  
     3  // SubscriptionOpeningStrategy describes opening strategy for subscriptions
     4  type SubscriptionOpeningStrategy = string
     5  
     6  const (
     7  	// SubscriptionOpeningStrategyOpenIfFree:
     8  	// The client will successfully open a subscription only if there isn't any other currently connected client.
     9  	// Otherwise it will end up with SubscriptionInUseError
    10  	SubscriptionOpeningStrategyOpenIfFree = "OpenIfFree"
    11  	// SubscriptionOpeningStrategyTakeOver:
    12  	// The connecting client will successfully open a subscription even if there is another active subscription's consumer.
    13  	// If the new client takes over an existing client then the existing one will get a SubscriptionInUseException.
    14  	//
    15  	// The subscription will always be held by the last connected client.
    16  	SubscriptionOpeningStrategyTakeOver = "TakeOver"
    17  	// SubscriptionOpeningStrategyWaitForFree:
    18  	// If the client currently cannot open the subscription because it is used by another client but it will wait for that client
    19  	// to complete and keep attempting to gain the subscription
    20  	SubscriptionOpeningStrategyWaitForFree = "WaitForFree"
    21  )