Skip to content

Commit

Permalink
Fix function creation for Pulsar < 3.0
Browse files Browse the repository at this point in the history
Removing `omitempty` from skipToLatest bool causes versions pre-3.0
versions of pulsar to barf from the unexpected key, even if the value is
false. Restoring it allows them to keep working if the value is false.
  • Loading branch information
flowchartsman committed Aug 22, 2023
1 parent c74ba31 commit ef9273f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion function_confg.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ type FunctionConfig struct {
MaxPendingAsyncRequests int `json:"maxPendingAsyncRequests,omitempty" yaml:"maxPendingAsyncRequests"`
//nolint
ExposePulsarAdminClientEnabled bool `json:"exposePulsarAdminClientEnabled" yaml:"exposePulsarAdminClientEnabled"`
SkipToLatest bool `json:"skipToLatest" yaml:"skipToLatest"`
SkipToLatest bool `json:"skipToLatest,omitempty" yaml:"skipToLatest"`
SubscriptionPosition string `json:"subscriptionPosition,omitempty" yaml:"subscriptionPosition"`
}

0 comments on commit ef9273f

Please sign in to comment.