Skip to content

Commit 041b454

Browse files
split bootstrap_servers into decoded_bootstrap_servers
1 parent a864e25 commit 041b454

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

aws_lambda_powertools/utilities/data_classes/kafka_event.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,14 @@ def event_source_arn(self) -> Optional[str]:
102102
return self.get("eventSourceArn")
103103

104104
@property
105-
def bootstrap_servers(self) -> List[str]:
105+
def bootstrap_servers(self) -> str:
106106
"""The Kafka bootstrap URL."""
107-
return self["bootstrapServers"].split(",")
107+
return self["bootstrapServers"]
108+
109+
@property
110+
def decoded_bootstrap_servers(self) -> List[str]:
111+
"""The decoded Kafka bootstrap URL."""
112+
return self.bootstrap_servers.split(",")
108113

109114
@property
110115
def records(self) -> Iterator[KafkaEventRecord]:

0 commit comments

Comments
 (0)