Skip to content
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

Smart Consumer for V2 #244

Open
ablease opened this issue Oct 19, 2023 · 0 comments
Open

Smart Consumer for V2 #244

ablease opened this issue Oct 19, 2023 · 0 comments
Labels
enhancement New feature or request v2.x Applicable to v2.x issues
Milestone

Comments

@ablease
Copy link

ablease commented Oct 19, 2023

Ideal Features

  • Consumer Context can contain chunk position + offset
  • Multiple Codec options, does not have to be external to the client
  • Message Handling must not block main thread
  • During consumer reconnect we must start at the same offset
  • Initial credits, should be configurable, perhaps specifiy a limit range (1-1000)

Description

Expanding on the V1 consumer, while addressing some issues highlighted in this issue #241. Keep the design close to Producer v2 for a more streamlined user experience. For example, the Consumer Options struct contains only optional params

Consumer Options

// ConsumerOpts handles optional parameters only
type ConsumerOpts struct {
	client             *Client
	ConsumerName       string
	streamName         string
	autocommit         bool
	autoCommitStrategy *AutoCommitStrategy
	Offset             OffsetSpecification
        Filter
	CRCCheck           bool
	initialCredits     int16
        sinlgeActiveConsumer bool
        reference string
}


// func (c *Consumer) CreateConsumer(stream string, opts ConsumerOpts) *Consumer {}

Single Active Consumer is created via the singleActiveConsumer bool and reference string in ConsumerOpts

@ablease ablease added the enhancement New feature or request label Oct 19, 2023
@Zerpet Zerpet added the v2.x Applicable to v2.x issues label Oct 20, 2023
@Zerpet Zerpet added this to the 2.0 milestone Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2.x Applicable to v2.x issues
Projects
None yet
Development

No branches or pull requests

2 participants