Skip to content

createPersistentSubscription does not create a working persistent subscription. #99

@hg-jarlinghaus

Description

@hg-jarlinghaus

Running createPersistentSubscription creates a persistent subscription that can be seen in the web ui, however some of the values do not get properly set so running

  const settings: client.PersistentSubscriptionSettings = {
    bufferSize: 500,
    checkpointAfterTime: 1000,
    checkpointMaxCount: 500,
    checkpointMinCount: 10,
    liveBufferSize: 500,
    maxRetryCount: 20,
    messageTimeoutMilliseconds: 10000,
    namedConsumerStrategy: "RoundRobin",
    readBatchSize: 20,
    subscriberMaxCount: 10,
  };
  await connection.createPersistentSubscription(
    "exampleStream",
    "exampleGroup",
    settings
  );

Results in a persistent subscription being made with the following settings.
image
So you can see that checkpointAfterTime, checkpointMaxCount, checkpointMinCount, subscriberMaxCount, bufferSize, and messageTimeoutMilliseconds, are not being set to their configured values. In addition events sent to the exampleStream do not get sent to anything that connects to that persistent subscription.

As wrong as the values that do get set for that subscription are, clicking Update on the web ui without changing any of those values and then having the client connect to that persistent subscription will succeed, and events in exampleStream will get processed normally. Unsure if this is just because it puts in reasonable defaults for everything except messageTimeoutMilliseconds and checkpointAfterTime or if there's something else happening too.

Repo with working example can be found here under the persistent-subscription-creation branch.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions