Package com.rabbitmq.stream
Interface StreamCreator
public interface StreamCreator
API to configure and create a stream.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The leader locator strategy.static interface
Super stream configuration. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionSet an argument for the stream creation.void
create()
Create the stream.filterSize
(int size) Set the size of the stream chunk filters.initialMemberCount
(int initialMemberCount) Set the number of initial members the stream should have.leaderLocator
(StreamCreator.LeaderLocator leaderLocator) TheStreamCreator.LeaderLocator
strategy.The maximum age of a stream before it gets truncated.maxLengthBytes
(ByteCapacity byteCapacity) The maximum size of the stream before it gets truncated.maxSegmentSizeBytes
(ByteCapacity byteCapacity) The maximum size of each stream segments.The name of the (super) stream.The name of the stream.Configure the super stream to create.
-
Field Details
-
MAX_SEGMENT_SIZE
Segment size is limited to 3 GB.
-
-
Method Details
-
stream
The name of the stream.Alias for
name(String)
.- Parameters:
stream
-- Returns:
- this creator instance
-
name
The name of the (super) stream.- Parameters:
name
-- Returns:
- this creator instance
- Since:
- 0.15.0
-
maxLengthBytes
The maximum size of the stream before it gets truncated.- Parameters:
byteCapacity
-- Returns:
- this creator instance
-
maxSegmentSizeBytes
The maximum size of each stream segments.Maximum size is
MAX_SEGMENT_SIZE
(3 GB).- Parameters:
byteCapacity
-- Returns:
- this creator instance
-
maxAge
The maximum age of a stream before it gets truncated.- Parameters:
maxAge
-- Returns:
- this creator instance
-
leaderLocator
TheStreamCreator.LeaderLocator
strategy.- Parameters:
leaderLocator
-- Returns:
- this creator instance
-
filterSize
Set the size of the stream chunk filters.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).
- Parameters:
size
- (in bytes)- Returns:
- this creator instance
- See Also:
-
initialMemberCount
Set the number of initial members the stream should have.- Parameters:
initialMemberCount
- initial number of nodes- Returns:
- this creator instance
- See Also:
-
argument
Set an argument for the stream creation.- Parameters:
key
- argument keyvalue
- argument value- Returns:
- this creator instance
-
superStream
StreamCreator.SuperStreamConfiguration superStream()Configure the super stream to create.Requires RabbitMQ 3.13.0 or more.
- Returns:
- the super stream configuration
- Since:
- 0.15.0
-
create
void create()Create the stream.This method is idempotent: the stream exists when it returns.
-