Skip to content

Commit

Permalink
Fix retention.ms long value
Browse files Browse the repository at this point in the history
  • Loading branch information
adam.gloyne committed Feb 16, 2024
1 parent 0d516ce commit 79923c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/LEGO.AsyncAPI.Bindings/Kafka/KafkaChannelBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class KafkaChannelBinding : ChannelBinding<KafkaChannelBinding>
private static FixedFieldMap<TopicConfigurationObject> kafkaChannelTopicConfigurationObjectFixedFields = new ()
{
{ "cleanup.policy", (a, n) => { a.CleanupPolicy = n.CreateSimpleList(s => s.GetScalarValue()); } },
{ "retention.ms", (a, n) => { a.RetentionMilliseconds = n.GetIntegerValue(); } },
{ "retention.ms", (a, n) => { a.RetentionMilliseconds = n.GetLongValue(); } },
{ "retention.bytes", (a, n) => { a.RetentionBytes = n.GetIntegerValue(); } },
{ "delete.retention.ms", (a, n) => { a.DeleteRetentionMilliseconds = n.GetIntegerValue(); } },
{ "max.message.bytes", (a, n) => { a.MaxMessageBytes = n.GetIntegerValue(); } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void KafkaChannelBinding_WithFilledObject_SerializesAndDeserializes()
cleanup.policy:
- delete
- compact
retention.ms: 2592000000
retention.ms: 15552000000
retention.bytes: 2
delete.retention.ms: 3
max.message.bytes: 4
Expand All @@ -45,7 +45,7 @@ public void KafkaChannelBinding_WithFilledObject_SerializesAndDeserializes()
TopicConfiguration = new TopicConfigurationObject()
{
CleanupPolicy = new List<string> { "delete", "compact" },
RetentionMilliseconds = 2592000000,
RetentionMilliseconds = 15552000000,
RetentionBytes = 2,
DeleteRetentionMilliseconds = 3,
MaxMessageBytes = 4,
Expand Down

0 comments on commit 79923c6

Please sign in to comment.