diff --git a/lib/nats/io/jetstream.rb b/lib/nats/io/jetstream.rb index 10e051f..91c4c69 100644 --- a/lib/nats/io/jetstream.rb +++ b/lib/nats/io/jetstream.rb @@ -13,9 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require_relative "msg" -require_relative "client" -require_relative "errors" require_relative "kv" require_relative "jetstream/api" require_relative "jetstream/errors" diff --git a/lib/nats/io/jetstream/msg.rb b/lib/nats/io/jetstream/msg.rb index bd5748d..a34e559 100644 --- a/lib/nats/io/jetstream/msg.rb +++ b/lib/nats/io/jetstream/msg.rb @@ -25,4 +25,9 @@ class JetStream module Msg end end + + class Msg + # Enhance it with ack related methods from JetStream to ack msgs. + include JetStream::Msg::AckMethods + end end diff --git a/lib/nats/io/msg.rb b/lib/nats/io/msg.rb index 5324347..a62fd5f 100644 --- a/lib/nats/io/msg.rb +++ b/lib/nats/io/msg.rb @@ -12,16 +12,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# -require_relative "jetstream" module NATS class Msg attr_accessor :subject, :reply, :data, :header - # Enhance it with ack related methods from JetStream to ack msgs. - include JetStream::Msg::AckMethods - def initialize(opts = {}) @subject = opts[:subject] @reply = opts[:reply]