Class: NATS::JetStream::API::ConsumerConfig

Inherits:
Struct
  • Object
show all
Defined in:
lib/nats/io/js.rb

Overview

ConsumerConfig is the consumer configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ ConsumerConfig

Returns a new instance of ConsumerConfig.



1145
1146
1147
1148
1149
1150
# File 'lib/nats/io/js.rb', line 1145

def initialize(opts={})
  # Filter unrecognized fields just in case.
  rem = opts.keys - members
  opts.delete_if { |k| rem.include?(k) }
  super(opts)
end

Instance Attribute Details

#ack_policyString

Returns:

  • (String)


1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/nats/io/js.rb', line 1138

ConsumerConfig = Struct.new(:durable_name, :description, :deliver_subject,
                            :deliver_group, :deliver_policy, :opt_start_seq,
                            :opt_start_time, :ack_policy, :ack_wait, :max_deliver,
                            :filter_subject, :replay_policy, :rate_limit_bps,
                            :sample_freq, :max_waiting, :max_ack_pending,
                            :flow_control, :idle_heartbeat, :headers_only,
                            keyword_init: true) do
  def initialize(opts={})
    # Filter unrecognized fields just in case.
    rem = opts.keys - members
    opts.delete_if { |k| rem.include?(k) }
    super(opts)
  end

  def to_json(*args)
    config = self.to_h
    config.delete_if { |_k, v| v.nil? }
    config.to_json(*args)
  end
end

#ack_waitInteger

Returns:

  • (Integer)


1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/nats/io/js.rb', line 1138

ConsumerConfig = Struct.new(:durable_name, :description, :deliver_subject,
                            :deliver_group, :deliver_policy, :opt_start_seq,
                            :opt_start_time, :ack_policy, :ack_wait, :max_deliver,
                            :filter_subject, :replay_policy, :rate_limit_bps,
                            :sample_freq, :max_waiting, :max_ack_pending,
                            :flow_control, :idle_heartbeat, :headers_only,
                            keyword_init: true) do
  def initialize(opts={})
    # Filter unrecognized fields just in case.
    rem = opts.keys - members
    opts.delete_if { |k| rem.include?(k) }
    super(opts)
  end

  def to_json(*args)
    config = self.to_h
    config.delete_if { |_k, v| v.nil? }
    config.to_json(*args)
  end
end

#deliver_groupObject

Returns the value of attribute deliver_group

Returns:

  • (Object)

    the current value of deliver_group



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def deliver_group
  @deliver_group
end

#deliver_policyString

Returns:

  • (String)


1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/nats/io/js.rb', line 1138

ConsumerConfig = Struct.new(:durable_name, :description, :deliver_subject,
                            :deliver_group, :deliver_policy, :opt_start_seq,
                            :opt_start_time, :ack_policy, :ack_wait, :max_deliver,
                            :filter_subject, :replay_policy, :rate_limit_bps,
                            :sample_freq, :max_waiting, :max_ack_pending,
                            :flow_control, :idle_heartbeat, :headers_only,
                            keyword_init: true) do
  def initialize(opts={})
    # Filter unrecognized fields just in case.
    rem = opts.keys - members
    opts.delete_if { |k| rem.include?(k) }
    super(opts)
  end

  def to_json(*args)
    config = self.to_h
    config.delete_if { |_k, v| v.nil? }
    config.to_json(*args)
  end
end

#deliver_subjectObject

Returns the value of attribute deliver_subject

Returns:

  • (Object)

    the current value of deliver_subject



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def deliver_subject
  @deliver_subject
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def description
  @description
end

#durable_nameString

Returns:

  • (String)


1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/nats/io/js.rb', line 1138

ConsumerConfig = Struct.new(:durable_name, :description, :deliver_subject,
                            :deliver_group, :deliver_policy, :opt_start_seq,
                            :opt_start_time, :ack_policy, :ack_wait, :max_deliver,
                            :filter_subject, :replay_policy, :rate_limit_bps,
                            :sample_freq, :max_waiting, :max_ack_pending,
                            :flow_control, :idle_heartbeat, :headers_only,
                            keyword_init: true) do
  def initialize(opts={})
    # Filter unrecognized fields just in case.
    rem = opts.keys - members
    opts.delete_if { |k| rem.include?(k) }
    super(opts)
  end

  def to_json(*args)
    config = self.to_h
    config.delete_if { |_k, v| v.nil? }
    config.to_json(*args)
  end
end

#filter_subjectObject

Returns the value of attribute filter_subject

Returns:

  • (Object)

    the current value of filter_subject



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def filter_subject
  @filter_subject
end

#flow_controlObject

Returns the value of attribute flow_control

Returns:

  • (Object)

    the current value of flow_control



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def flow_control
  @flow_control
end

#headers_onlyObject

Returns the value of attribute headers_only

Returns:

  • (Object)

    the current value of headers_only



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def headers_only
  @headers_only
end

#idle_heartbeatObject

Returns the value of attribute idle_heartbeat

Returns:

  • (Object)

    the current value of idle_heartbeat



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def idle_heartbeat
  @idle_heartbeat
end

#max_ack_pendingInteger

Returns:

  • (Integer)


1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/nats/io/js.rb', line 1138

ConsumerConfig = Struct.new(:durable_name, :description, :deliver_subject,
                            :deliver_group, :deliver_policy, :opt_start_seq,
                            :opt_start_time, :ack_policy, :ack_wait, :max_deliver,
                            :filter_subject, :replay_policy, :rate_limit_bps,
                            :sample_freq, :max_waiting, :max_ack_pending,
                            :flow_control, :idle_heartbeat, :headers_only,
                            keyword_init: true) do
  def initialize(opts={})
    # Filter unrecognized fields just in case.
    rem = opts.keys - members
    opts.delete_if { |k| rem.include?(k) }
    super(opts)
  end

  def to_json(*args)
    config = self.to_h
    config.delete_if { |_k, v| v.nil? }
    config.to_json(*args)
  end
end

#max_deliverInteger

Returns:

  • (Integer)


1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/nats/io/js.rb', line 1138

ConsumerConfig = Struct.new(:durable_name, :description, :deliver_subject,
                            :deliver_group, :deliver_policy, :opt_start_seq,
                            :opt_start_time, :ack_policy, :ack_wait, :max_deliver,
                            :filter_subject, :replay_policy, :rate_limit_bps,
                            :sample_freq, :max_waiting, :max_ack_pending,
                            :flow_control, :idle_heartbeat, :headers_only,
                            keyword_init: true) do
  def initialize(opts={})
    # Filter unrecognized fields just in case.
    rem = opts.keys - members
    opts.delete_if { |k| rem.include?(k) }
    super(opts)
  end

  def to_json(*args)
    config = self.to_h
    config.delete_if { |_k, v| v.nil? }
    config.to_json(*args)
  end
end

#max_waitingInteger

Returns:

  • (Integer)


1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/nats/io/js.rb', line 1138

ConsumerConfig = Struct.new(:durable_name, :description, :deliver_subject,
                            :deliver_group, :deliver_policy, :opt_start_seq,
                            :opt_start_time, :ack_policy, :ack_wait, :max_deliver,
                            :filter_subject, :replay_policy, :rate_limit_bps,
                            :sample_freq, :max_waiting, :max_ack_pending,
                            :flow_control, :idle_heartbeat, :headers_only,
                            keyword_init: true) do
  def initialize(opts={})
    # Filter unrecognized fields just in case.
    rem = opts.keys - members
    opts.delete_if { |k| rem.include?(k) }
    super(opts)
  end

  def to_json(*args)
    config = self.to_h
    config.delete_if { |_k, v| v.nil? }
    config.to_json(*args)
  end
end

#opt_start_seqObject

Returns the value of attribute opt_start_seq

Returns:

  • (Object)

    the current value of opt_start_seq



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def opt_start_seq
  @opt_start_seq
end

#opt_start_timeObject

Returns the value of attribute opt_start_time

Returns:

  • (Object)

    the current value of opt_start_time



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def opt_start_time
  @opt_start_time
end

#rate_limit_bpsObject

Returns the value of attribute rate_limit_bps

Returns:

  • (Object)

    the current value of rate_limit_bps



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def rate_limit_bps
  @rate_limit_bps
end

#replay_policyString

Returns:

  • (String)


1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/nats/io/js.rb', line 1138

ConsumerConfig = Struct.new(:durable_name, :description, :deliver_subject,
                            :deliver_group, :deliver_policy, :opt_start_seq,
                            :opt_start_time, :ack_policy, :ack_wait, :max_deliver,
                            :filter_subject, :replay_policy, :rate_limit_bps,
                            :sample_freq, :max_waiting, :max_ack_pending,
                            :flow_control, :idle_heartbeat, :headers_only,
                            keyword_init: true) do
  def initialize(opts={})
    # Filter unrecognized fields just in case.
    rem = opts.keys - members
    opts.delete_if { |k| rem.include?(k) }
    super(opts)
  end

  def to_json(*args)
    config = self.to_h
    config.delete_if { |_k, v| v.nil? }
    config.to_json(*args)
  end
end

#sample_freqObject

Returns the value of attribute sample_freq

Returns:

  • (Object)

    the current value of sample_freq



1138
1139
1140
# File 'lib/nats/io/js.rb', line 1138

def sample_freq
  @sample_freq
end

Instance Method Details

#to_json(*args) ⇒ Object



1152
1153
1154
1155
1156
# File 'lib/nats/io/js.rb', line 1152

def to_json(*args)
  config = self.to_h
  config.delete_if { |_k, v| v.nil? }
  config.to_json(*args)
end