GH-1465: Part 1: Provision Super Streams over AMQP

See https://github.com/spring-projects/spring-amqp/issues/1465

Inspired by 29b1a3eca7/src/test/java/com/rabbitmq/stream/impl/TestUtils.java (L244-L276)

* Docs and Polishing.

- address PR review
- move abstract test class to `support`
This commit is contained in:
Gary Russell
2022-06-16 13:18:33 -04:00
committed by GitHub
parent 6dae0fc094
commit d143d4b7ae
5 changed files with 170 additions and 4 deletions

View File

@@ -157,3 +157,27 @@ public StreamRetryOperationsInterceptorFactoryBean sfb(RetryTemplate retryTempla
====
IMPORTANT: Stateful retry is not supported with this container.
==== Super Streams
A Super Stream is an abstract concept for a partitioned stream, implemented by binding a number of stream queues to an exchange having an argument `x-super-stream: true`.
===== Provisioning
For convenience, a super stream can be provisioned by defining a single bean of type `SuperStream`.
====
[source, java]
----
@Bean
SuperStream superStream() {
return new SuperStream("my.super.stream", 3);
}
----
====
The `RabbitAdmin` detects this bean and will declare the exchange (`my.super.stream`) and 3 queues (partitions) - `my.super-stream-n` where `n` is `0`, `1`, `2`, bound with routing keys equal to `n`.
===== Consuming Super Streams with Single Active Consumers
TBD.