Skip to content

v3.4.0

Compare
Choose a tag to compare
@George-Payne George-Payne released this 14 Jul 13:40
· 104 commits to master since this release

Features

Add retry count to persistent subscription events

Adds retryCount property to events from subscribeToPersistentSubscriptionToStream and subscribeToPersistentSubscriptionToAll View

const subscription = client.subscribeToPersistentSubscriptionToStream(
  STREAM_NAME,
  GROUP_NAME
);

for await (const event of subscription) {
  try {
    console.log(
      `handling event ${event.event?.type} with retryCount ${event.retryCount}`
    );
    await handleEvent(event);
    await subscription.ack(event);
  } catch (error) {
    await subscription.nack(PARK, error.toString(), event);
  }
}

Bug Fixes

  • Fix doc comment on readStream View
  • Fix type definition for acl in stream metadata View