Skip to content

Release v2.4.0

Latest
Compare
Choose a tag to compare
@wallyqs wallyqs released this 22 Nov 04:02
· 6 commits to main since this release
v2.4.0
43d01f4

Fixed

  • Fixed loading Rails Engine by @palkan in (#132)
  • Fixed crash when assigning URI port to default value by @cavalle in (#135)

Added

  • Add support for consumer multiple filters and streams/consumers metadata (#138)
# Creating a stream with multiple subjects
js.add_stream(name: "MULTI_FILTER", subjects: ["foo.one.*", "foo.two.*", "foo.three.*"])

# PullSubscriber that takes an array and creates a consumer with multiple filters .
js.pull_subscribe(["foo.one.1", "foo.two.2"], "example")

# PushSubscriber that takes an array and creates a consumer with multiple filters .
js.subscribe(["foo.one.1", "foo.three.3"])

# via JetStream#add_consumer API
consumer = js.add_consumer("MULTI_FILTER", {
       name: "my-consumer",
       filter_subjects: ["foo.one.*", "foo.two.*"]
})

# Pass nil to both subject and durable consumer name to bind to already created consumer
js.pull_subscribe(nil, nil, name: "my-consumer", stream: "MULTI_FILTER")

# Stream with metadata
stream = js.add_stream({
    :name     => "WITH_METADATA",
    :metadata => {
      'foo': 'bar',
      'hello': 'world'
    }
})

Full Changelog: v2.3.0...v2.4.0