Skip to content

Commit 93ba475

Browse files
committed
fix: long values for missing retention properties
1 parent 0d516ce commit 93ba475

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/LEGO.AsyncAPI.Bindings/Kafka/KafkaChannelBinding.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public class KafkaChannelBinding : ChannelBinding<KafkaChannelBinding>
4747
private static FixedFieldMap<TopicConfigurationObject> kafkaChannelTopicConfigurationObjectFixedFields = new ()
4848
{
4949
{ "cleanup.policy", (a, n) => { a.CleanupPolicy = n.CreateSimpleList(s => s.GetScalarValue()); } },
50-
{ "retention.ms", (a, n) => { a.RetentionMilliseconds = n.GetIntegerValue(); } },
51-
{ "retention.bytes", (a, n) => { a.RetentionBytes = n.GetIntegerValue(); } },
52-
{ "delete.retention.ms", (a, n) => { a.DeleteRetentionMilliseconds = n.GetIntegerValue(); } },
50+
{ "retention.ms", (a, n) => { a.RetentionMilliseconds = n.GetLongValue(); } },
51+
{ "retention.bytes", (a, n) => { a.RetentionBytes = n.GetLongValue(); } },
52+
{ "delete.retention.ms", (a, n) => { a.DeleteRetentionMilliseconds = n.GetLongValue(); } },
5353
{ "max.message.bytes", (a, n) => { a.MaxMessageBytes = n.GetIntegerValue(); } },
5454
{ "confluent.key.schema.validation", (a, n) => { a.ConfluentKeySchemaValidation = n.GetBooleanValue(); } },
5555
{ "confluent.key.subject.name.strategy", (a, n) => { a.ConfluentKeySubjectName = n.GetScalarValue(); } },

test/LEGO.AsyncAPI.Tests/Bindings/Kafka/KafkaBindings_Should.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void KafkaChannelBinding_WithFilledObject_SerializesAndDeserializes()
2727
cleanup.policy:
2828
- delete
2929
- compact
30-
retention.ms: 2592000000
30+
retention.ms: 15552000000
3131
retention.bytes: 2
3232
delete.retention.ms: 3
3333
max.message.bytes: 4
@@ -45,7 +45,7 @@ public void KafkaChannelBinding_WithFilledObject_SerializesAndDeserializes()
4545
TopicConfiguration = new TopicConfigurationObject()
4646
{
4747
CleanupPolicy = new List<string> { "delete", "compact" },
48-
RetentionMilliseconds = 2592000000,
48+
RetentionMilliseconds = 15552000000,
4949
RetentionBytes = 2,
5050
DeleteRetentionMilliseconds = 3,
5151
MaxMessageBytes = 4,

0 commit comments

Comments
 (0)