lib/nats/io/js.rb in nats-pure-2.1.0 vs lib/nats/io/js.rb in nats-pure-2.1.2

- old
+ new

@@ -116,10 +116,11 @@ durable = params[:durable] flow_control = params[:flow_control] manual_ack = params[:manual_ack] idle_heartbeat = params[:idle_heartbeat] flow_control = params[:flow_control] + config = params[:config] if queue if durable and durable != queue raise NATS::JetStream::Error.new("nats: cannot create queue subscription '#{queue}' to consumer '#{durable}'") else @@ -1133,16 +1134,28 @@ # @return [String] # @!attribute max_waiting # @return [Integer] # @!attribute max_ack_pending # @return [Integer] - ConsumerConfig = Struct.new(:durable_name, :description, :deliver_subject, - :deliver_group, :deliver_policy, :opt_start_seq, - :opt_start_time, :ack_policy, :ack_wait, :max_deliver, + ConsumerConfig = Struct.new(:durable_name, :description, + :deliver_policy, :opt_start_seq, :opt_start_time, + :ack_policy, :ack_wait, :max_deliver, :backoff, :filter_subject, :replay_policy, :rate_limit_bps, :sample_freq, :max_waiting, :max_ack_pending, :flow_control, :idle_heartbeat, :headers_only, + + # Pull based options + :max_batch, :max_expires, + # Push based consumers + :deliver_subject, :deliver_group, + # Ephemeral inactivity threshold + :inactive_threshold, + # Generally inherited by parent stream and other markers, + # now can be configured directly. + :num_replicas, + # Force memory storage + :memory_storage, keyword_init: true) do def initialize(opts={}) # Filter unrecognized fields just in case. rem = opts.keys - members opts.delete_if { |k| rem.include?(k) } @@ -1192,13 +1205,14 @@ # @return [String] # @!attribute num_replicas # @return [Integer] # @!attribute duplicate_window # @return [Integer] - StreamConfig = Struct.new(:name, :subjects, :retention, :max_consumers, - :max_msgs, :max_bytes, :max_age, + StreamConfig = Struct.new(:name, :description, :subjects, :retention, :max_consumers, + :max_msgs, :max_bytes, :discard, :max_age, :max_msgs_per_subject, :max_msg_size, - :discard, :storage, :num_replicas, :duplicate_window, + :storage, :num_replicas, :no_ack, :duplicate_window, + :placement, :allow_direct, keyword_init: true) do def initialize(opts={}) # Filter unrecognized fields just in case. rem = opts.keys - members opts.delete_if { |k| rem.include?(k) }