public interface StreamCreator
| Modifier and Type | Interface and Description |
|---|---|
static class |
StreamCreator.LeaderLocator
The leader locator strategy.
|
static interface |
StreamCreator.SuperStreamConfiguration
Super stream configuration.
|
| Modifier and Type | Field and Description |
|---|---|
static ByteCapacity |
MAX_SEGMENT_SIZE
Segment size is limited to 3 GB.
|
| Modifier and Type | Method and Description |
|---|---|
StreamCreator |
argument(String key,
String value)
Set an argument for the stream creation.
|
void |
create()
Create the stream.
|
StreamCreator |
filterSize(int size)
Set the size of the stream chunk filters.
|
StreamCreator |
initialMemberCount(int initialMemberCount)
Set the number of initial members the stream should have.
|
StreamCreator |
leaderLocator(StreamCreator.LeaderLocator leaderLocator)
The
StreamCreator.LeaderLocator strategy. |
StreamCreator |
maxAge(Duration maxAge)
The maximum age of a stream before it gets truncated.
|
StreamCreator |
maxLengthBytes(ByteCapacity byteCapacity)
The maximum size of the stream before it gets truncated.
|
StreamCreator |
maxSegmentSizeBytes(ByteCapacity byteCapacity)
The maximum size of each stream segments.
|
StreamCreator |
name(String name)
The name of the (super) stream.
|
StreamCreator |
stream(String stream)
The name of the stream.
|
StreamCreator.SuperStreamConfiguration |
superStream()
Configure the super stream to create.
|
static final ByteCapacity MAX_SEGMENT_SIZE
StreamCreator stream(String stream)
Alias for name(String).
stream - StreamCreator name(String name)
name - StreamCreator maxLengthBytes(ByteCapacity byteCapacity)
byteCapacity - StreamCreator maxSegmentSizeBytes(ByteCapacity byteCapacity)
Maximum size is MAX_SEGMENT_SIZE (3 GB).
byteCapacity - StreamCreator maxAge(Duration maxAge)
maxAge - StreamCreator leaderLocator(StreamCreator.LeaderLocator leaderLocator)
StreamCreator.LeaderLocator strategy.leaderLocator - StreamCreator filterSize(int size)
Must be between 16 and 255 bytes, default is 16.
Use a bloom filter calculator to size the filter accordingly to the possible number of filter values and the acceptable rate of false positives (RabbitMQ Stream uses 2 hash functions).
size - (in bytes)ProducerBuilder.filterValue(Function),
ConsumerBuilder.filter()StreamCreator initialMemberCount(int initialMemberCount)
initialMemberCount - initial number of nodesStreamCreator argument(String key, String value)
key - argument keyvalue - argument valueStreamCreator.SuperStreamConfiguration superStream()
Requires RabbitMQ 3.13.0 or more.
void create()
This method is idempotent: the stream exists when it returns.
Copyright © 2024 Broadcom Inc. and/or its subsidiaries. All rights reserved.