Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,17 @@ _If a station already exists nothing happens, the new configuration will not be
```python
station = memphis.station(
name="<station-name>",
schema_name="<schema-name>",
schema_name="<schema-name>", # defaults to "" (no schema)
retention_type=Retention.MAX_MESSAGE_AGE_SECONDS, # MAX_MESSAGE_AGE_SECONDS/MESSAGES/BYTES/ACK_BASED(cloud only). Defaults to MAX_MESSAGE_AGE_SECONDS
retention_value=604800, # defaults to 604800
storage_type=Storage.DISK, # Storage.DISK/Storage.MEMORY. Defaults to DISK
replicas=1, # defaults to 1
idempotency_window_ms=120000, # defaults to 2 minutes
send_poison_msg_to_dls=True, # defaults to true
send_schema_failed_msg_to_dls=True, # defaults to true
tiered_storage_enabled=False # defaults to false
partitions_number=1 # default to 1
tiered_storage_enabled=False, # defaults to false
partitions_number=1, # defaults to 1
dls_station="<station-name>" # defaults to "" (no DLS station) - If selected DLS events will be sent to selected station as well
)
```

Expand Down
11 changes: 9 additions & 2 deletions memphis/memphis.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ async def station(
send_poison_msg_to_dls: bool = True,
send_schema_failed_msg_to_dls: bool = True,
tiered_storage_enabled: bool = False,
partitions_number = 1,
partitions_number: int = 1,
dls_station: str = "",
):
"""Creates a station.
Args:
Expand All @@ -252,6 +253,11 @@ async def station(
replicas (int, optional):number of replicas for the messages of the data. Defaults to 1.
idempotency_window_ms (int, optional): time frame in which idempotent messages will be tracked, happens based on message ID Defaults to 120000.
schema_name (str): schema name.
send_poison_msg_to_dls (bool): whether unacked(poison) messages (reached the max deliveries) should be sent into the DLS. Defaults to True.
send_schema_failed_msg_to_dls (bool): whether schema violation messages should be sent into the DLS. Defaults to True.
tiered_storage_enabled (bool): if true + tiered storage configured - messages hit the retention will be moved into tier 2 storage. Defaults to False.
partitions_number (int): number of partitions for the station. Defaults to 1.
dls_station (str): If selected DLS events will be sent to selected station as well. Defaults to "".
Returns:
object: station
"""
Expand All @@ -275,7 +281,8 @@ async def station(
},
"username": self.username,
"tiered_storage_enabled": tiered_storage_enabled,
"partitions_number" : partitions_number
"partitions_number" : partitions_number,
"dls_station": dls_station
}
create_station_req_bytes = json.dumps(create_station_req, indent=2).encode(
"utf-8"
Expand Down