in src/Epam.Kafka.PubSub/Publication/Options/PublicationOptionsValidate.cs [37:63]
public static string? ValidateInternal(IPublicationTopicWrapperOptions options)
{
string? result = PubSubOptionsValidate.ValidateString(nameof(PublicationOptions.DefaultTopic), options.GetDefaultTopic(), regex: RegexHelper.TopicNameRegex);
if (result != null)
{
return result;
}
Type? keyType = options.GetKeyType();
if (keyType != null && options.GetKeySerializer() == null &&
!SerializationHelper.DefaultSerializers.TryGetValue(keyType, out _))
{
return $"Custom serializer not set for non default key type {keyType}.";
}
Type? valueType = options.GetValueType();
if (valueType != null && options.GetValueSerializer() == null &&
!SerializationHelper.DefaultSerializers.TryGetValue(valueType, out _))
{
return $"Custom serializer not set for non default value type {valueType}.";
}
return null;
}