Skip to content

Add support for single active consumer #94

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

Merged
merged 67 commits into from
Aug 11, 2022
Merged

Conversation

acogoluegnes
Copy link
Contributor

@acogoluegnes acogoluegnes commented Mar 31, 2022

Documentation.

Fixes #46.

@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch 4 times, most recently from 7556e0a to 1481930 Compare April 5, 2022 13:12
@acogoluegnes acogoluegnes marked this pull request as draft April 7, 2022 08:59
@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch 3 times, most recently from b3cc4ae to 0388ff4 Compare April 14, 2022 07:56
@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch from 90ab4ca to e4c459c Compare April 15, 2022 15:07
@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch from e4c459c to 0121c44 Compare April 25, 2022 09:34
@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch 3 times, most recently from 124bef0 to cf58107 Compare May 9, 2022 13:10
@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch from 29b1a3e to c8d9ec3 Compare June 16, 2022 07:47
@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch 3 times, most recently from 96a0888 to 93a6c35 Compare June 29, 2022 08:18
@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #94 (b136638) into main (b40739d) will increase coverage by 0.08%.
The diff coverage is n/a.

❗ Current head b136638 differs from pull request most recent head 8cfb410. Consider uploading reports for the commit 8cfb410 to get more accurate results

@@             Coverage Diff              @@
##               main      #94      +/-   ##
============================================
+ Coverage     82.42%   82.50%   +0.08%     
+ Complexity     1049     1020      -29     
============================================
  Files            78       76       -2     
  Lines          7054     6849     -205     
  Branches        725      707      -18     
============================================
- Hits           5814     5651     -163     
+ Misses          890      864      -26     
+ Partials        350      334      -16     
Impacted Files Coverage Δ
...rabbitmq/stream/impl/SimpleMessageAccumulator.java 89.74% <0.00%> (-5.13%) ⬇️
...a/com/rabbitmq/stream/impl/ServerFrameHandler.java 85.65% <0.00%> (-0.31%) ⬇️
...com/rabbitmq/stream/impl/ConsumersCoordinator.java 85.96% <0.00%> (-0.07%) ⬇️
src/main/java/com/rabbitmq/stream/impl/Client.java 83.36% <0.00%> (-0.06%) ⬇️
...itmq/stream/perf/PrometheusEndpointMonitoring.java 100.00% <0.00%> (ø)
...in/java/com/rabbitmq/stream/NoOffsetException.java
...m/rabbitmq/stream/StreamNotAvailableException.java
.../rabbitmq/stream/perf/DebugEndpointMonitoring.java 92.53% <0.00%> (+0.11%) ⬆️
.../java/com/rabbitmq/stream/impl/StreamProducer.java 85.99% <0.00%> (+0.38%) ⬆️
...va/com/rabbitmq/stream/impl/StreamEnvironment.java 87.15% <0.00%> (+0.76%) ⬆️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch 2 times, most recently from a1727fd to d93ef42 Compare July 5, 2022 08:07
@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch from bbc26f4 to b8f9088 Compare July 13, 2022 07:16
References rabbitmq/rabbitmq-server#3753

Conflicts:
	src/main/java/com/rabbitmq/stream/Constants.java
	src/main/java/com/rabbitmq/stream/impl/Client.java
	src/main/java/com/rabbitmq/stream/impl/ServerFrameHandler.java
References rabbitmq/rabbitmq-server#3753

Conflicts:
	src/test/java/com/rabbitmq/stream/impl/SingleActiveConsumerTest.java
Instead of client-side in-memory tracking, because it's more realistic.

References rabbitmq/rabbitmq-server#3753

Conflicts:
	src/test/java/com/rabbitmq/stream/impl/SingleActiveConsumerTest.java
WIP.

References rabbitmq/rabbitmq-server#3753

Conflicts:
	src/main/java/com/rabbitmq/stream/impl/OffsetTrackingCoordinator.java
	src/main/java/com/rabbitmq/stream/impl/StreamConsumer.java

Conflicts:
	src/main/java/com/rabbitmq/stream/impl/StreamConsumer.java

Conflicts:
	src/test/java/com/rabbitmq/stream/impl/SingleActiveConsumerTest.java
To disable server-side offset tracking. Useful when SAC is enabled
and external storage is used for offset tracking.

References #46
In performance tool documentation.
Setting the SAC status to false is safe when the connection
is lost, even if no notification came. This makes sure
the consumer instance state is consistent, as a new SAC consumer
is always inactive when it first registers.

References #46
Conflicts:
	src/main/java/com/rabbitmq/stream/impl/OffsetTrackingCoordinator.java
	src/main/java/com/rabbitmq/stream/impl/StreamConsumer.java
	src/test/java/com/rabbitmq/stream/impl/StreamConsumerTest.java
Make mock consumer returns it's open.
It's already done in a decorating message handler, in
the consumer itself.

References #142
When created from performance tool.
The artifact can deleted from the repository afterwards.
Conflicts:
	src/docs/asciidoc/setup.adoc
To make sure messages with a given key (e.g. user name) end up
in the same partition.
Not mandatory, but for consistency with
ConsumerBuilder#superStream(String).
@acogoluegnes acogoluegnes force-pushed the single-active-consumer branch from 9353dc5 to 0e7e9a8 Compare August 10, 2022 13:34
Refactor also the JUnit conditions to check the broker version.
@acogoluegnes acogoluegnes marked this pull request as ready for review August 11, 2022 07:35
@acogoluegnes acogoluegnes merged commit 8d483c0 into main Aug 11, 2022
@acogoluegnes acogoluegnes deleted the single-active-consumer branch August 11, 2022 07:35
pivotal-rabbitmq-ci pushed a commit that referenced this pull request Aug 11, 2022
Add support for single active consumer
pivotal-rabbitmq-ci pushed a commit that referenced this pull request Aug 11, 2022
Add support for single active consumer
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.

Add support for single active consumer and super streams
1 participant