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.
[0.5.0] - 2026-07-26
Changed
- License changed from MIT to Apache-2.0. The
LICENSEfile is now the full Apache License 2.0 text andmix.exsdeclaresApache-2.0, matching the license of thegrpc_connection_poolandgrpcdependencies. Releases up to and including 0.4.2 remain MIT-licensed; only 0.5.0 onward is Apache-2.0. Apache-2.0 is still permissive, but it adds an explicit patent grant and requires that recipients be given a copy of the license and notice of any modified files. - Updated
grpc_connection_poolfrom 0.3.0 to 0.5.1, which moves the underlyinggrpcdependency to 1.0 (was 0.11.5).protobufmoves 0.16 → 0.17 andgunto 2.4.1. TheGrpcConnectionPoolAPI used by this library (GrpcConnectionPool.get_channel/1,GrpcConnectionPool.status/1,GrpcConnectionPool.stop/1, and theConfigbuildersnew/1,from_env/1,local/1,production/1) is unchanged. - The dependency requirement is now
~> 0.5.1rather than an exact pin, so patch updates no longer require a release here.
Fixed
- Removed
{GRPC.Client.Supervisor, []}from the application supervision tree. grpc 1.0 deleted that module — the name is now just the registered name of aDynamicSupervisorthat grpc starts itself in GRPC.Client.Application. Keeping the child spec crashes at boot with "The module GRPC.Client.Supervisor was given as a child to a supervisor but it does not exist". Nothing replaces it; no manual start is needed.
Upgrade notes
- No changes are required in application code. If you added
{GRPC.Client.Supervisor, []}to your own supervision tree (pre-1.0 grpc's README recommended it), remove it — it will crash at boot under grpc 1.0. - If you attached telemetry handlers to
[:grpc_connection_pool, :channel, :gun_down]or[:grpc_connection_pool, :channel, :gun_error], switch to the adapter-agnostic[:grpc_connection_pool, :channel, :connection_down](metadata:pool_name,reason). Those two events were removed upstream ingrpc_connection_pool0.5.0. This library's own[:pubsub_grpc, ...]events are unaffected.
[0.4.2] - 2026-05-14
Changed
- Version bump only (package metadata).
[0.4.1] - 2026-05-14
Added
- Telemetry events for publish/pull/ack operations.
Fixed
- Goth token expiry handling when
expiresis returned as an integer. - Credential-safety and silent-failure hardening across auth and client paths.
[0.4.0] - 2026-03-24
Breaking Changes
- All error returns now use
%PubsubGrpc.Error{}struct instead of raw%GRPC.RPCError{}- Pattern match on
error.codeatoms::not_found,:already_exists,:unauthenticated, etc. - Original gRPC error preserved in
error.detailsfor migration
- Pattern match on
PubsubGrpc.Auth.request_opts/0now returns{:ok, opts}|{:error, %Error{}}instead of bare list- Removed deprecated 2-arity
Client.execute/2(use 1-arity operation functions) - Schema type/view enum helpers now return errors for invalid values instead of silently defaulting
- Input validation added to all public functions — invalid inputs return
{:error, %Error{code: :validation_error}}
Added
PubsubGrpc.Error— structured error type with code, message, details, and gRPC statusPubsubGrpc.Validation— input validation for all parameters (project IDs, topic IDs, messages, ack IDs, deadlines, etc.)- New API functions:
get_topic/2— get topic detailsget_subscription/2— get subscription detailslist_subscriptions/2— list subscriptions in a projectmodify_ack_deadline/4— modify ack deadline for messagesnack/3— negatively acknowledge messages (immediate redelivery)validate_message/4— validate message against existing schemavalidate_message_with_schema/5— validate message against inline schema definition
- Auth token caching — ETS-based cache with TTL, avoids re-fetching on every request
- Per-request timeouts — configurable via
:default_timeoutapp env (default: 30s) - Logging — Logger warnings/errors for auth failures, config fallbacks
- Typespecs on all public functions
- Unit tests for Error, Validation, and Auth modules
- Validation integration tests (no emulator needed)
- Integration tests for all new API functions
Fixed
- Silent authentication failures now log warnings and return proper error tuples
- Empty message list no longer silently sent to server (validated)
- Empty ack_ids list no longer silently sent to server (validated)
- Application config fallback now logs warning instead of failing silently
- Dead code removed from Client module (2-arity execute with unused pool logic)
Migration Guide
# Before (v0.3.x)
case PubsubGrpc.create_topic("proj", "topic") do
{:ok, topic} -> topic
{:error, %GRPC.RPCError{status: 6}} -> "exists"
end
# After (v0.4.0)
case PubsubGrpc.create_topic("proj", "topic") do
{:ok, topic} -> topic
{:error, %PubsubGrpc.Error{code: :already_exists}} -> "exists"
{:error, %PubsubGrpc.Error{code: :validation_error} = err} -> "invalid: #{err}"
end
# Auth.request_opts/0 now returns {:ok, opts}
{:ok, opts} = PubsubGrpc.Auth.request_opts()
# or in emulator mode: {:ok, []}[0.3.1] - 2025-11-21
Fixed
- Critical fix: Resolved
FunctionClauseErrorduring GRPC connection termination ingrpc_connection_poolworker- Modified worker cleanup logic to handle Gun-based connections safely
- Bypasses problematic pattern matching in GRPC v0.11.5's disconnect handling
- Prevents GenServer crashes with error:
no function clause matching in anonymous fn/1 in GRPC.Client.Connection.handle_call/3
- Improved connection pool stability during shutdown and restart cycles
Added
- Comprehensive tests for disconnect behavior and connection pool lifecycle
- Integration tests verifying graceful pool shutdown without errors
[0.3.0] - 2025-01-21
Changed
- BREAKING: Updated
grpc_connection_pooldependency from 0.1.3 to 0.1.5- New architecture uses DynamicSupervisor with Registry-based health tracking
- Round-robin channel distribution without checkout/checkin overhead
- Improved connection reliability with exponential backoff and jitter
- Upgraded
grpclibrary from 0.10.2 to 0.11.5 - Added
GRPC.Client.Supervisorto application supervision tree (required by grpc 0.11.5)
Internal
- Updated
PubsubGrpc.Client.execute/2to use newGrpcConnectionPool.get_channel/1API - Improved test initialization sequence to ensure emulator is ready before pool connections
- Updated tests to work with new pool architecture
Migration Notes
- No changes required to public API - all existing code continues to work
- Pool process name changed from
PubsubGrpc.ConnectionPooltoPubsubGrpc.ConnectionPool.Supervisor - Connection establishment is now asynchronous with automatic retry on failure
[0.2.5] - 2025-01-XX
Previous release with grpc_connection_pool 0.1.3