class

NATS::Subscription

Inherits Reference / Object

A subscription to a given subject and possible queue group. Used to unsubscribe/close.

nc = NATS::Connection.new("demo.nats.io")
sub = nc.subscribe("foo") { |msg| }
sub.close
sub.unsubscribe

Instance methods

close

ditto

Source
closed?

Determines if the subscription is already closed.

Source
unsubscribe

Will unsubscribe from a subscription.

Source