Exemple #1
0
 /**
  * Sets the duplicate checking window in the the NATSJetStreamConfig.  A TimeSpan.Zero
  * disables duplicate checking.  Duplicate checking is disabled by default.
  * @param window duration to hold message ids for duplicate checking.
  * @return Builder
  */
 public JetStreamConfigBuilder SetDuplicateWindow(TimeSpan window)
 {
     this.DuplicateWindow = NATSJetStreamValidator.ValidateTimeSpanNotRequiredGtOrEqZero(window);
     return(this);
 }
Exemple #2
0
 /**
  * Sets the number of replicas a message must be stored on in the NATSJetStreamConfig.
  * @param replicas the number of replicas to store this message on
  * @return Builder
  */
 public JetStreamConfigBuilder SetReplicas(int replicas)
 {
     this.Replicas = NATSJetStreamValidator.ValidateNumberOfReplicas(replicas);
     return(this);
 }
Exemple #3
0
 /**
  * Sets the Maximum age in the NATSJetStreamConfig.
  * @param MaxAge the Maximum message age
  * @return Builder
  */
 public JetStreamConfigBuilder SetMaxAge(TimeSpan maxAge)
 {
     this.MaxAge = NATSJetStreamValidator.ValidateTimeSpanNotRequiredGtOrEqZero(maxAge);
     return(this);
 }
Exemple #4
0
 /**
  * Sets the Maximum message size in the NATSJetStreamConfig.
  * @param MaxMsgSize the Maximum message size
  * @return Builder
  */
 public JetStreamConfigBuilder SetMaxMsgSize(long maxMsgSize)
 {
     this.MaxMsgSize = NATSJetStreamValidator.ValidateMaxMessageSize(maxMsgSize);
     return(this);
 }
Exemple #5
0
 /**
  * Sets the Maximum number of bytes in the NATSJetStreamConfig.
  * @param MaxBytes the Maximum number of bytes
  * @return Builder
  */
 public JetStreamConfigBuilder SetMaxBytes(long maxBytes)
 {
     this.MaxBytes = NATSJetStreamValidator.ValidateMaxBytes(maxBytes);
     return(this);
 }