Skip to content

Implement JoinGroup request as first class stream#844

Merged
jfallows merged 6 commits into
aklivity:developfrom
akrambek:bug/719
Mar 12, 2024
Merged

Implement JoinGroup request as first class stream#844
jfallows merged 6 commits into
aklivity:developfrom
akrambek:bug/719

Conversation

@akrambek

Copy link
Copy Markdown
Contributor

Description

Move join group request stream out of coordinator stream and use a separate connection if the group.initial.rebalance.delay.ms > 0 otherwise use the connection pool since there won't be any delay.

Fixes #719

final BindingHandler streamFactory = config.clientConnectionPool() ? connectionPool.streamFactory() :
context.streamFactory();

final Function<Integer, BindingHandler> streamFactorySupplier = d ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid auto-boxing, use IntFunction<BindingHandler> instead, for all references too.

final long resolvedId = resolved.id;
final List<KafkaServerConfig> servers = binding.servers();
final KafkaSaslConfig sasl = resolveSasl.apply(binding.sasl());
final KafkaSaslConfig sasl = resolveSaslSupplier.apply(0).apply(binding.sasl());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please define a constant private static final int NO_REBALANCE_DELAY = 0 and use it here instead of 0.


private MessageConsumer newStream(
MessageConsumer sender,
int initialDelay,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the meaning already associated with initial for streams, let's rename initialDelay to rebalanceDelay in this file.

@jfallows jfallows merged commit e873e17 into aklivity:develop Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zilla Quickstart gRPC RouteGuide service hangs after lots of messages

2 participants