View Source Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Note: certain Spear versions add support for new EventStoreDB features gated behind new EventStoreDB versions. You should not downgrade your Spear version in order to avoid these features: Spear aims to keep a stable interface usable across all EventStoreDB versions v20+.

1-0-0-2022-05-11

1.0.0 - 2022-05-11

This release represent stability in the API. There are no functional changes between this release and v0.11.0.

0-11-0-2021-11-04

0.11.0 - 2021-11-04

added

Added

These features require the new EventStoreDB version v21.10.0 released on 2021-11-03.

changed

Changed

  • According to the v21.10.0 server release notes's breaking changes section, deleting a stream that does not currently exist will now throw an error

0-10-0-2021-08-30

0.10.0 - 2021-08-30

added-1

Added

  • Implemented the creation, updating, reading, and deletion of persistent subscriptions to the :all stream
    • this feature requires EventStoreDB v21.6.0 or later
  • Implemented Spear.append_batch/5 for high-throughput asynchronous appends
  • Added Spear.subscribe_to_stats/3 and Spear.Client.subscribe_to_stats/2
    • this opens a subscription for EventStoreDB monitoring
    • this feature requires EventStoreDB v21.6.0 or later
  • Added a dependency on the :event_store_db_gpb_protobfs package
    • this package is just a convenience for developing spear: we can build gpb definitions for the EventStoreDB protobufs on-the-fly via the rebar3 gpb plugin, so we never need to commit the erl/hrl files for the generated gpb modules.
    • this also allows other (non-Elixir even) libraries to take advantage of versioned, pre-generated gpb definitions for the EventStoreDB grpc interface

changed-1

Changed

  • Non-event read responses are now discarded when reading from a stream
    • this will allow the compatibility of spear v0.10.0 with the next release of EventStoreDB
    • this should not change behavior with any existing EventStoreDB versions

fixed

Fixed

  • Fixed the Spear.set_global_acl/4 function to correctly append ACL data as an event to the $streams metadata stream, instead of to the $streams stream directly.

0-9-1-2021-06-01

0.9.1 - 2021-06-01

added-2

Added

fixed-1

Fixed

  • Removed compilation of mint version in user-agent function
    • This could cause a compilation error when using spear as a transitive dependency

0-9-0-2021-04-29

0.9.0 - 2021-04-29

added-3

Added

removed

Removed

  • Removed link metadata from the Spear.Event.metadata map's possible :link field.
    • use the new top-level :link field as Spear.Event.link.metadata

Note that this may be a breaking change for any consumers depending on the optional :link field in the metadata packet. Consumers should update by instead matching on a Spear.Event.t/0 struct in the :link field of any event, or by using the new Spear.Event.id/1 or Spear.Event.revision/1 functions.

0-8-1-2021-04-27

0.8.1 - 2021-04-27

added-4

Added

  • Added the link's stream to the Spear.Event.metadata.link field

fixed-2

Fixed

0-8-0-2021-04-26

0.8.0 - 2021-04-26

added-5

Added

  • Added the :read_only? configuration flag for Spear.Connection.Configuration
    • this allows one to limit what the Spear.Connection will perform to read-only operations such as reading streams
  • Added link metadata to the Spear.Event.metadata packet in a new :link field

fixed-3

Fixed

0-7-0-2021-04-24

0.7.0 - 2021-04-24

added-6

Added

Note that this is a breaking change for any consumers matching explicitly on :eos tuples. Consumers relying on the prior data shape should update like so

- def handle_info({:eos, reason}, state) do
+ def handle_info({:eos, _subscription, reason}, state) do

0-6-1-2021-04-23

0.6.1 - 2021-04-23

fixed-4

Fixed

  • Spear.stream!/3 now reads :from revisions as inclusive
    • e.g. passing some event in the stream to :from will ensure that the first element in the enumerable is ^event
    • the same principal applies when passing event revisions
    • see #26
    • if this behavior is undesirable, a Spear user may Stream.drop/2 the initial element in the enumerable
  • Spear.connect_to_persistent_subscription/5 now returns an error tuple when attempting to connect to a persistent subscription stream and group that has not yet been created.
    • the reason is a Spear.Grpc.Response struct with a status of :not_found

added-7

Added

  • Subscriptions may now emit {:eos, :dropped} in cases where the EventStoreDB explicitly terminates the subscription
    • this can happen if a persistent subscription is deleted while it has subscribers actively connected
    • each subscriber will receive {:eos, :dropped} in its mailbox

0-6-0-2021-04-21

0.6.0 - 2021-04-21

added-8

Added

changed-2

Changed

  • Moved Spear.cancel_subscription/3 under the utils API instead of streams
    • This function may also be used to cancel persistent subscriptions

0-5-0-2021-04-19

0.5.0 - 2021-04-19

added-9

Added

  • Added the gossip API
    • this API is very small: just one function Spear.cluster_info/2
    • also added Spear.Client.cluster_info/1
    • under the hood, this also added the ability to decode structured UUIDs received from the EventStoreDB, as are received in the Spear.ClusterMember.instance_id field. See Spear.Uuid for the interesting implementation.
    • added the record interface Spear.Records.Gossip

fixed-5

Fixed

  • Properly grouped free-floating modules under the proper structures and types or record interface groupings in the documentation

0-4-0-2021-04-19

0.4.0 - 2021-04-19

fixed-6

Fixed

  • Updated security guide to use new configuration style

added-10

Added

0-3-0-2021-04-18

0.3.0 - 2021-04-18

added-11

Added

0-2-1-2021-04-17

0.2.1 - 2021-04-17

added-12

Added

0-2-0-2021-04-17

0.2.0 - 2021-04-17

changed-3

Changed

  • Refactored connection configuration to go through validation
    • :opts option has been renamed to :mint_opts
    • credentials are passed through the :connection_string option or as :username and :password options

added-13

Added

  • Implemented and documented keep-alive
    • This can be configured through the keepAliveInterval and keepAliveTimeout query params in :connection_string or by the new :keep_alive_interval and :keep_alive_timeout configuration options

0-1-4-2021-04-16

0.1.4 - 2021-04-16

added-14

Added

  • {:eos, :closed} is now emitted when a subscription is broken due to the connection between closed between Spear.Connection and EventStoreDB
  • Spear.Connection now monitors subscription processes and cancels EventStoreDB subscriptions upon subscriber process exit

0-1-3-2021-04-15

0.1.3 - 2021-04-15

added-15

Added

0-1-2-2021-04-14

0.1.2 - 2021-04-14

added-16

Added

changed-4

Changed

  • Changed the internals of Spear.Connection to take advantage of the new Connection dependency
    • A failure to connect on GenServer init for a connection will no longer take down the supervision tree
    • Failures to connect will result in back-off retries in 500ms segments
    • The life-cycle of the HTTP2 connection spawned by a Spear.Connection is now divorced from the life-cycle of the Spear.Connection process

0-1-1-2021-04-14

0.1.1 - 2021-04-14

removed-1

Removed

  • Removed dependency on elixir-protobuf/protobuf
    • see #4
    • also removed all generated files from protobuf

added-17

Added

  • Added dependency on :gpb
    • and associated generated erlang files
  • Added Spear.Records.* interface for interacting with gpb-generated records

0-1-0-2021-04-12

0.1.0 - 2021-04-12

added-18

Added

  • Initial implementation of a client for the streams API
    • all notable functions are labeled with the since: "0.1.0" doc attribute