-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
59 ability to consume messages from superstream #149
59 ability to consume messages from superstream #149
Conversation
13a80af
to
577a2e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -310,6 +321,11 @@ export class Client { | |||
return res.ok | |||
} | |||
|
|||
public async declareSuperStreamConsumer(superStream: string, handle: ConsumerFunc): Promise<SuperStreamConsumer> { | |||
const partitions = await this.queryPartitions({ superStream }) | |||
return SuperStreamConsumer.create(handle, { locator: this, consumerRef: "test", partitions }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the consumerRef is hardcoded as "test", is it right?
@@ -82,6 +82,7 @@ export class StreamPublisher implements Publisher { | |||
private scheduled: NodeJS.Immediate | null | |||
private logger: Logger | |||
private maxChunkLength: number | |||
private isClosed = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly do not like "is" properties, I would suggest using only closed, wdyt?
export class SuperStreamConsumer { | ||
private consumers: Map<string, Consumer> = new Map<string, Consumer>() | ||
public consumerRef: string | ||
private locator: Client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is locator a good name for the client underneath the consumer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the locator, that's the term we are using for the client that manages the connections right?
No description provided.