Skip to content

catalog: wire planNames hint through CatalogCache to catalog plugin API - #2259

Open
jutur wants to merge 2 commits into
killbill:masterfrom
jutur:catalog-plugin-shallow-fetch
Open

catalog: wire planNames hint through CatalogCache to catalog plugin API#2259
jutur wants to merge 2 commits into
killbill:masterfrom
jutur:catalog-plugin-shallow-fetch

Conversation

@jutur

@jutur jutur commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Adds a getCatalog overload on CatalogCache that accepts a Set planNames and threads it through to the catalog plugin via the new CatalogPluginApi.getVersionedPluginCatalog(planNames, properties, context) overload introduced in killbill-plugin-api.

Plugins managing large catalogs can now return a shallow catalog containing only the requested plans when Kill Bill passes a non-empty plan set, reducing serialization overhead. The default implementation on CatalogPluginApi falls back to the full-catalog method, so existing plugins remain unaffected.

DefaultCatalogCache.getCatalog(planNames) delegates to the existing getCatalog() for all non-plugin paths (file-based, cached tenant catalog) since the optimization only applies to plugin-supplied catalogs.

Depends on killbill-plugin-api# which adds the planNames overload to CatalogPluginApi.

Fixes #2258

jutur added 2 commits June 16, 2026 21:52
Adds a getCatalog overload on CatalogCache that accepts a Set<String>
planNames and threads it through to the catalog plugin via the new
CatalogPluginApi.getVersionedPluginCatalog(planNames, properties, context)
overload introduced in killbill-plugin-api.

Plugins managing large catalogs can now return a shallow catalog
containing only the requested plans when Kill Bill passes a non-empty
plan set, reducing serialization overhead. The default implementation on
CatalogPluginApi falls back to the full-catalog method, so existing
plugins remain unaffected.

DefaultCatalogCache.getCatalog(planNames) delegates to the existing
getCatalog() for all non-plugin paths (file-based, cached tenant catalog)
since the optimization only applies to plugin-supplied catalogs.

Depends on killbill-plugin-api#<PR> which adds the planNames overload to
CatalogPluginApi.

Fixes killbill#2258
Verify that the new getCatalog(planNames,...) overload correctly passes
the plan-name hint to CatalogPluginApi.getVersionedPluginCatalog(planNames,...),
and that an empty planNames set also reaches the 3-arg plugin overload.

Remove unused Collectors import introduced during refactoring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance catalog plugin API to fetch shallow catalog

1 participant